Skip to content

Commit

Permalink
fix: disable keepNames in vite:esbuild (fixes #9164) (#9166)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jul 17, 2022
1 parent cc980b0 commit e6f3b02
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/plugins/esbuild.ts
Expand Up @@ -182,7 +182,11 @@ export function esbuildPlugin(options: ESBuildOptions = {}): Plugin {
minifyIdentifiers: false,
minifySyntax: false,
minifyWhitespace: false,
treeShaking: false
treeShaking: false,
// keepNames is not needed when minify is disabled.
// Also transforming multiple times with keepNames enabled breaks
// tree-shaking. (#9164)
keepNames: false
}

return {
Expand Down

0 comments on commit e6f3b02

Please sign in to comment.