mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
build - minify via gulp-uglify-es instead of uglifyify
This commit is contained in:
parent
4e7b0ff15c
commit
5c9cb0b787
20
gulpfile.js
20
gulpfile.js
@ -484,16 +484,6 @@ function generateBundler(opts, performBundle) {
|
||||
NODE_ENV: opts.devMode ? 'development' : 'production',
|
||||
}))
|
||||
|
||||
// Minification
|
||||
if (opts.minifyBuild) {
|
||||
bundler.transform('uglifyify', {
|
||||
global: true,
|
||||
mangle: {
|
||||
reserved: [ 'MetamaskInpageProvider' ]
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
if (opts.watch) {
|
||||
bundler = watchify(bundler)
|
||||
// on any file update, re-runs the bundler
|
||||
@ -567,6 +557,16 @@ function bundleTask(opts) {
|
||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||
}
|
||||
|
||||
// Minification
|
||||
if (opts.minifyBuild) {
|
||||
buildStream = buildStream
|
||||
.pipe(uglify({
|
||||
mangle: {
|
||||
reserved: [ 'MetamaskInpageProvider' ]
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
// Finalize Source Maps (writes .map file)
|
||||
if (opts.buildSourceMaps) {
|
||||
buildStream = buildStream
|
||||
|
@ -272,7 +272,6 @@
|
||||
"stylelint-config-standard": "^18.2.0",
|
||||
"tape": "^4.5.1",
|
||||
"testem": "^2.0.0",
|
||||
"uglifyify": "github:MetaMask/uglifyify#keep-flags",
|
||||
"vinyl-buffer": "^1.0.1",
|
||||
"vinyl-source-stream": "^2.0.0",
|
||||
"watchify": "^3.9.0"
|
||||
|
Loading…
Reference in New Issue
Block a user