From 9082a850eef4ab0187fc3bfdd5a377f0c7040070 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Wed, 7 Dec 2022 00:53:15 +0800 Subject: [PATCH] Exclude astro from Vite optimization (#5545) --- .changeset/chilled-papayas-build.md | 5 +++++ packages/astro/src/core/create-vite.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilled-papayas-build.md diff --git a/.changeset/chilled-papayas-build.md b/.changeset/chilled-papayas-build.md new file mode 100644 index 000000000..374f6ed94 --- /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 4339563c4..da774e9ac 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 }),