File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const isRollup = parseEnv('BUILD_ROLLUP', false)
17
17
const isUMD = BUILD_FORMAT === 'umd'
18
18
const isCJS = BUILD_FORMAT === 'cjs'
19
19
const isWebpack = parseEnv ( 'BUILD_WEBPACK' , false )
20
+ const isMinify = parseEnv ( 'BUILD_MINIFY' , false )
20
21
const treeshake = parseEnv ( 'BUILD_TREESHAKE' , isRollup || isWebpack )
21
22
const alias = parseEnv ( 'BUILD_ALIAS' , isPreact ? { react : 'preact' } : null )
22
23
@@ -81,7 +82,9 @@ module.exports = () => ({
81
82
? require . resolve ( 'babel-plugin-transform-inline-environment-variables' )
82
83
: null ,
83
84
[ require . resolve ( '@babel/plugin-proposal-class-properties' ) , { loose : true } ] ,
84
- require . resolve ( 'babel-plugin-minify-dead-code-elimination' ) ,
85
+ isMinify
86
+ ? require . resolve ( 'babel-plugin-minify-dead-code-elimination' )
87
+ : null ,
85
88
treeshake
86
89
? null
87
90
: require . resolve ( '@babel/plugin-transform-modules-commonjs' ) ,
You can’t perform that action at this time.
0 commit comments