diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 85e31963a..d72cbac45 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -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: [], }, };