diff --git a/.changeset/spotty-dryers-exist.md b/.changeset/spotty-dryers-exist.md new file mode 100644 index 000000000000..c630b1b2203d --- /dev/null +++ b/.changeset/spotty-dryers-exist.md @@ -0,0 +1,5 @@ +--- +'@astrojs/deno': patch +--- + +Fixed an issue where deno integration broke some frameworks. diff --git a/packages/integrations/deno/src/index.ts b/packages/integrations/deno/src/index.ts index d1dd6103dd52..c3e231853549 100644 --- a/packages/integrations/deno/src/index.ts +++ b/packages/integrations/deno/src/index.ts @@ -130,6 +130,12 @@ export default function createIntegration(args?: Options): AstroIntegration { `[@astrojs/deno] Otherwise, this adapter is not required to deploy a static site to Deno.` ); } + + }, + 'astro:config:setup' ({ updateConfig }) { + updateConfig({ + vite: { ssr: { noExternal: COMPATIBLE_NODE_MODULES } } + }) }, 'astro:build:setup': ({ vite, target }) => { if (target === 'server') { @@ -149,9 +155,6 @@ export default function createIntegration(args?: Options): AstroIntegration { (vite.resolve.alias as Record)[alias.find] = alias.replacement; } } - vite.ssr = { - noExternal: COMPATIBLE_NODE_MODULES, - }; if (Array.isArray(vite.build.rollupOptions.external)) { vite.build.rollupOptions.external.push(DENO_IMPORTS_SHIM);