File tree 1 file changed +5
-7
lines changed
packages/vite/src/node/plugins
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,7 @@ export const buildEsbuildPlugin = (config: ResolvedConfig): Plugin => {
237
237
}
238
238
239
239
const target = config . build . target
240
- const minify =
241
- config . build . minify === 'esbuild' &&
242
- // Do not minify ES lib output since that would remove pure annotations
243
- // and break tree-shaking
244
- // https://github.com/vuejs/core/issues/2860#issuecomment-926882793
245
- ! ( config . build . lib && opts . format === 'es' )
240
+ const minify = config . build . minify === 'esbuild'
246
241
247
242
if ( ( ! target || target === 'esnext' ) && ! minify ) {
248
243
return null
@@ -253,7 +248,10 @@ export const buildEsbuildPlugin = (config: ResolvedConfig): Plugin => {
253
248
target : target || undefined ,
254
249
...( minify
255
250
? {
256
- minify,
251
+ // Do not minify ES lib output since that would remove pure annotations
252
+ // and break tree-shaking
253
+ // https://github.com/vuejs/core/issues/2860#issuecomment-926882793
254
+ minify : ! ( config . build . lib && opts . format === 'es' ) ,
257
255
treeShaking : true ,
258
256
format : rollupToEsbuildFormatMap [ opts . format ]
259
257
}
You can’t perform that action at this time.
0 commit comments