diff --git a/.changeset/eighty-trainers-accept.md b/.changeset/eighty-trainers-accept.md new file mode 100644 index 000000000..c4bb890a1 --- /dev/null +++ b/.changeset/eighty-trainers-accept.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +add hide to style & script generated for island diff --git a/packages/astro/src/runtime/server/scripts.ts b/packages/astro/src/runtime/server/scripts.ts index 47cd122f1..791be3201 100644 --- a/packages/astro/src/runtime/server/scripts.ts +++ b/packages/astro/src/runtime/server/scripts.ts @@ -1,7 +1,7 @@ import type { SSRResult } from '../../@types/astro.js'; import islandScript from './astro-island.prebuilt.js'; -const ISLAND_STYLES = ``; +const ISLAND_STYLES = ``; export function determineIfNeedsHydrationScript(result: SSRResult): boolean { if (result._metadata.hasHydrationScript) { @@ -36,12 +36,12 @@ export function getPrescripts(result: SSRResult, type: PrescriptType, directive: // deps to be loaded immediately. switch (type) { case 'both': - return `${ISLAND_STYLES}`; case 'directive': - return ``; + return ``; } return ''; }