Skip to content

Commit

Permalink
fix: prevent pre-bundling @vite/client and @vite/env (#4716)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
tmkx and antfu committed Aug 25, 2021
1 parent 48b3b3b commit e8c1906
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 e8c1906

Please sign in to comment.