mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
Add define option
Same as Terser's `--define`
This commit is contained in:
parent
ee1ed683b3
commit
b9d853eb50
@ -488,6 +488,10 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
compress: {
|
||||
keep_infinity: true,
|
||||
pure_getters: true,
|
||||
global_defs: Object.assign({
|
||||
NODE_ENV: process.env.NODE_ENV || 'production',
|
||||
'process.env.NODE_ENV': process.env.NODE_ENV || 'production'
|
||||
}, options.define || {})
|
||||
},
|
||||
warnings: true,
|
||||
ecma: 5,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user