mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
11 lines
428 B
Plaintext
11 lines
428 B
Plaintext
---
|
|
// Separate component so drainPageScripts(Astro.request) executes only at this point of the
|
|
// render stream (after the page content render has STARTED — registrations are
|
|
// synchronous, script content may be a promise).
|
|
import { drainPageScripts } from '@shared/lib/page-scripts'
|
|
|
|
const scripts = await Promise.all(drainPageScripts(Astro.request))
|
|
---
|
|
|
|
{scripts.length > 0 && <Fragment set:html={scripts.join('\n')} />}
|