fix(deno): do not set vite.ssr.noExternal (#8652)

* fix(deno): safely set external specifiers

* noExternal does not need to be manually set at all
This commit is contained in:
Arsh 2023-09-25 13:43:43 +00:00 committed by GitHub
parent 211bfe3b00
commit 954cadc1e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/deno': patch
---
Fixed an issue where deno integration broke some frameworks.

View file

@ -130,6 +130,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
`[@astrojs/deno] Otherwise, this adapter is not required to deploy a static site to Deno.`
);
}
},
'astro:build:setup': ({ vite, target }) => {
if (target === 'server') {
@ -149,9 +150,6 @@ export default function createIntegration(args?: Options): AstroIntegration {
(vite.resolve.alias as Record<string, string>)[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);