Exclude node-fetch from vite.optimizeDeps (#3348)

* fix: exclude `node-fetch` from vite.optimizeDeps

* chore: format
This commit is contained in:
Nate Moore 2022-05-11 16:26:01 -05:00 committed by GitHub
parent 484b80eb99
commit 43e411eed8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Update default `vite.optimizeDeps.exclude` to keep `node-fetch` from being optimized

View file

@ -55,6 +55,7 @@ export async function createVite(
logLevel: 'warn', // log warnings and errors only
optimizeDeps: {
entries: ['src/**/*'], // Try and scan a users project (wont catch everything),
exclude: ['node-fetch'],
},
plugins: [
configAliasVitePlugin({ config: astroConfig }),