Skip to content

Commit

Permalink
fix: prevent pre-bundling @vite/client and @vite/env (vitejs#4716)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
2 people authored and aleclarson committed Nov 8, 2021
1 parent f93e329 commit 8b650ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/optimizer/scan.ts
Expand Up @@ -163,7 +163,11 @@ function esbuildScanPlugin(
}

const include = config.optimizeDeps?.include
const exclude = config.optimizeDeps?.exclude
const exclude = [
...(config.optimizeDeps?.exclude || []),
'@vite/client',
'@vite/env'
]

const externalUnlessEntry = ({ path }: { path: string }) => ({
path,
Expand Down

0 comments on commit 8b650ea

Please sign in to comment.