|
|
|
@ -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 |
|
|
|
|