diff --git a/.changeset/chilled-papayas-build.md b/.changeset/chilled-papayas-build.md new file mode 100644 index 000000000000..374f6ed94444 --- /dev/null +++ b/.changeset/chilled-papayas-build.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Exclude astro from Vite optimization diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 4339563c46ae..da774e9ace51 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -93,7 +93,7 @@ export async function createVite( appType: 'custom', optimizeDeps: { entries: ['src/**/*'], - exclude: ['node-fetch'], + exclude: ['astro', 'node-fetch'], }, plugins: [ configAliasVitePlugin({ settings }),