fix: remove astro from noExternal
This commit is contained in:
parent
ec6c6169dc
commit
3d7c4b0247
1 changed files with 1 additions and 5 deletions
|
@ -19,7 +19,6 @@ const ALWAYS_EXTERNAL = new Set([
|
|||
...builtinModules.map((name) => `node:${name}`),
|
||||
'@sveltejs/vite-plugin-svelte',
|
||||
'@proload/core',
|
||||
require.resolve('@proload/core'),
|
||||
'@babel/core',
|
||||
'babel-plugin-module-resolver',
|
||||
'serialize-javascript',
|
||||
|
@ -31,9 +30,6 @@ const ALWAYS_EXTERNAL = new Set([
|
|||
'unified',
|
||||
'whatwg-url',
|
||||
]);
|
||||
const ALWAYS_NOEXTERNAL = new Set([
|
||||
'astro', // This is only because Vite's native ESM doesn't resolve "exports" correctly.
|
||||
]);
|
||||
|
||||
// note: ssr is still an experimental API hence the type omission
|
||||
export type ViteConfigWithSSR = vite.InlineConfig & { ssr?: { external?: string[]; noExternal?: string[] } };
|
||||
|
@ -76,7 +72,7 @@ export async function createVite(inlineConfig: ViteConfigWithSSR, { astroConfig,
|
|||
// Note: SSR API is in beta (https://vitejs.dev/guide/ssr.html)
|
||||
ssr: {
|
||||
external: [...ALWAYS_EXTERNAL],
|
||||
noExternal: [...ALWAYS_NOEXTERNAL],
|
||||
noExternal: [],
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue