diff options
author | 2023-09-22 15:39:27 +0800 | |
---|---|---|
committer | 2023-09-22 09:39:27 +0200 | |
commit | da00425a5f6c539ba9dd3d4abed3486678dc6a54 (patch) | |
tree | 0b6b8dbfdf9ac35d827fb027f6a6417e7b4a6355 | |
parent | 4e1e8dc5c6876156f4c136519344d0f49cb130f5 (diff) | |
download | astro-da00425a5f6c539ba9dd3d4abed3486678dc6a54.tar.gz astro-da00425a5f6c539ba9dd3d4abed3486678dc6a54.tar.zst astro-da00425a5f6c539ba9dd3d4abed3486678dc6a54.zip |
Revert "fix: islands are not being rendered correctly (#8580)" (#8624)
This reverts commit 8d361169b8e487933d671ce347f0ce74922c80cc.
-rw-r--r-- | packages/astro/src/runtime/server/scripts.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/astro/src/runtime/server/scripts.ts b/packages/astro/src/runtime/server/scripts.ts index 791be3201..47cd122f1 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 = `<style style="display:none">astro-island,astro-slot,astro-static-slot{display:contents}</style>`; +const ISLAND_STYLES = `<style>astro-island,astro-slot,astro-static-slot{display:contents}</style>`; 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}<script style="display:none">${getDirectiveScriptText( + return `${ISLAND_STYLES}<script>${getDirectiveScriptText( result, directive )};${islandScript}</script>`; case 'directive': - return `<script style="display:none">${getDirectiveScriptText(result, directive)}</script>`; + return `<script>${getDirectiveScriptText(result, directive)}</script>`; } return ''; } |