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:
parent
211bfe3b00
commit
954cadc1e5
2 changed files with 6 additions and 3 deletions
5
.changeset/spotty-dryers-exist.md
Normal file
5
.changeset/spotty-dryers-exist.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/deno': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed an issue where deno integration broke some frameworks.
|
|
@ -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.`
|
`[@astrojs/deno] Otherwise, this adapter is not required to deploy a static site to Deno.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'astro:build:setup': ({ vite, target }) => {
|
'astro:build:setup': ({ vite, target }) => {
|
||||||
if (target === 'server') {
|
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.resolve.alias as Record<string, string>)[alias.find] = alias.replacement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vite.ssr = {
|
|
||||||
noExternal: COMPATIBLE_NODE_MODULES,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Array.isArray(vite.build.rollupOptions.external)) {
|
if (Array.isArray(vite.build.rollupOptions.external)) {
|
||||||
vite.build.rollupOptions.external.push(DENO_IMPORTS_SHIM);
|
vite.build.rollupOptions.external.push(DENO_IMPORTS_SHIM);
|
||||||
|
|
Loading…
Reference in a new issue