Skip to content

Commit e996921

Browse files
bluwysarah11918
andauthored
Update .changeset/five-jars-hear.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
1 parent 70eb517 commit e996921

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.changeset/five-jars-hear.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
'astro': patch
33
---
44

5-
Removes the `experimental.directRenderScript` option and always render script directly. This new strategy prevents scripts from being executed in pages where they are not used.
5+
Updates Astro's default `<script>` rendering strategy and removes the `experimental.directRenderScript` option as this is now the default behavior: scripts are always rendered directly. This new strategy prevents scripts from being executed in pages where they are not used.
66

77
Scripts will directly render as declared in Astro files (including existing features like TypeScript, importing `node_modules`, and deduplicating scripts). You can also now conditionally render scripts in your Astro file.
88

9-
However, this means scripts are no longer hoisted to the `<head>`, multiple scripts on a page are no longer bundled together, and the `<script>` tag may interfere with the CSS styling. Make sure to review your script tags and ensure that they behave as expected.
9+
However, this means scripts are no longer hoisted to the `<head>`, multiple scripts on a page are no longer bundled together, and the `<script>` tag may interfere with the CSS styling.
10+
11+
As this is a potentially breaking change to your script behavior, please review your `<script>` tags and ensure that they behave as expected.

0 commit comments

Comments
 (0)