Exclude node-fetch
from vite.optimizeDeps (#3348)
* fix: exclude `node-fetch` from vite.optimizeDeps * chore: format
This commit is contained in:
parent
484b80eb99
commit
43e411eed8
2 changed files with 6 additions and 0 deletions
5
.changeset/funny-poets-walk.md
Normal file
5
.changeset/funny-poets-walk.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update default `vite.optimizeDeps.exclude` to keep `node-fetch` from being optimized
|
|
@ -55,6 +55,7 @@ export async function createVite(
|
||||||
logLevel: 'warn', // log warnings and errors only
|
logLevel: 'warn', // log warnings and errors only
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
entries: ['src/**/*'], // Try and scan a user’s project (won’t catch everything),
|
entries: ['src/**/*'], // Try and scan a user’s project (won’t catch everything),
|
||||||
|
exclude: ['node-fetch'],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
configAliasVitePlugin({ config: astroConfig }),
|
configAliasVitePlugin({ config: astroConfig }),
|
||||||
|
|
Loading…
Reference in a new issue