diff options
author | 2024-11-19 16:12:40 +0000 | |
---|---|---|
committer | 2024-11-19 16:12:40 +0000 | |
commit | 46f6b386b3db6332f286d79958ef10261958cceb (patch) | |
tree | 6844bb82556fe214ab3a9bc26a4141fa0aa6d568 | |
parent | 80a9a5299a9d51f2b09900d3200976d687feae8f (diff) | |
download | astro-46f6b386b3db6332f286d79958ef10261958cceb.tar.gz astro-46f6b386b3db6332f286d79958ef10261958cceb.tar.zst astro-46f6b386b3db6332f286d79958ef10261958cceb.zip |
fix(build): generated entry (#12477)
-rw-r--r-- | .changeset/thin-cups-peel.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/build/plugins/plugin-ssr.ts | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/.changeset/thin-cups-peel.md b/.changeset/thin-cups-peel.md new file mode 100644 index 000000000..3fc4678cb --- /dev/null +++ b/.changeset/thin-cups-peel.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes an issue where the SSR build was emitting the `dist/server/entry.mjs` file with an incorrect import at the top of the file/ diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 883cdee38..eb59eff65 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -283,7 +283,6 @@ function generateSSRCode(settings: AstroSettings, adapter: AstroAdapter, middlew `import { renderers } from '${RENDERERS_MODULE_ID}';`, `import * as serverEntrypointModule from '${ADAPTER_VIRTUAL_MODULE_ID}';`, `import { manifest as defaultManifest } from '${SSR_MANIFEST_VIRTUAL_MODULE_ID}';`, - edgeMiddleware ? `` : `import { onRequest as middleware } from '${middlewareId}';`, settings.config.experimental.serverIslands ? `import { serverIslandMap } from '${VIRTUAL_ISLAND_MAP_ID}';` : '', |