Skip to content

Commit

Permalink
Exclude node-fetch from vite.optimizeDeps (#3348)
Browse files Browse the repository at this point in the history
* fix: exclude `node-fetch` from vite.optimizeDeps

* chore: format
  • Loading branch information
natemoo-re authored May 11, 2022
1 parent 484b80e commit 43e411e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-poets-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Update default `vite.optimizeDeps.exclude` to keep `node-fetch` from being optimized
1 change: 1 addition & 0 deletions packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export async function createVite(
logLevel: 'warn', // log warnings and errors only
optimizeDeps: {
entries: ['src/**/*'], // Try and scan a user’s project (won’t catch everything),
exclude: ['node-fetch'],
},
plugins: [
configAliasVitePlugin({ config: astroConfig }),
Expand Down

0 comments on commit 43e411e

Please sign in to comment.