0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00
astro/.changeset/violet-terms-live.md
Matthew Phillips aeab890971
Inline small hoisted scripts (#3658)
* Inline small hoisted scripts

This makes it so that small hoisted scripts get inlined into the page rather than be fetched externally.

* Ensure we don't inline when there are imports

* Fix ts

* Update tests with new url structure

* Adds a changeset
2022-06-22 12:02:42 -04:00

283 B

astro
patch

Inlines small hoisted scripts

This enables a perf improvement, whereby small hoisted scripts without dependencies are inlined into the HTML, rather than loaded externally. This uses vite.build.assetInlineLimit to determine if the script should be inlined.