chore(distro): apply envify transform
This commit is contained in:
parent
ea17632311
commit
1184cbd271
|
@ -2098,6 +2098,16 @@
|
|||
"integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
|
||||
"dev": true
|
||||
},
|
||||
"envify": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/envify/-/envify-4.1.0.tgz",
|
||||
"integrity": "sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esprima": "4.0.0",
|
||||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"error-ex": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"cpx": "^1.5.0",
|
||||
"del": "^3.0.0",
|
||||
"del-cli": "^1.1.0",
|
||||
"envify": "^4.1.0",
|
||||
"eslint": "^4.14.0",
|
||||
"eslint-plugin-mocha": "^4.9.0",
|
||||
"jsondiffpatch": "^0.1.26",
|
||||
|
|
|
@ -8,7 +8,8 @@ var browserify = require('browserify'),
|
|||
flattenBundle = require('browser-pack-flat/plugin'),
|
||||
commonShake = require('common-shakeify'),
|
||||
unassertify = require('unassertify'),
|
||||
uglify = require('uglify-es');
|
||||
uglify = require('uglify-es'),
|
||||
envify = require('envify');
|
||||
|
||||
var pkg = require('../package');
|
||||
|
||||
|
@ -127,6 +128,9 @@ function bundle(dest, variant, entry, done) {
|
|||
timer.start('build prod');
|
||||
|
||||
browserify(browserifyOptions)
|
||||
.transform(envify, {
|
||||
NODE_ENV: 'production'
|
||||
})
|
||||
.transform(unassertify)
|
||||
.plugin(commonShake)
|
||||
.plugin(flattenBundle)
|
||||
|
@ -166,6 +170,9 @@ function bundle(dest, variant, entry, done) {
|
|||
timer.start('build dev');
|
||||
|
||||
browserify(browserifyOptions)
|
||||
.transform(envify, {
|
||||
NODE_ENV: 'development'
|
||||
})
|
||||
.plugin(collapse)
|
||||
.plugin(derequire)
|
||||
.add(src)
|
||||
|
|
Loading…
Reference in New Issue