diff options
author | Frankie <frankie.diamond@gmail.com> | 2018-05-01 01:44:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 01:44:38 +0800 |
commit | 9b1c07c75045f4a7124e4f0fcd416535f88182ae (patch) | |
tree | 2245ee7fc0c6bc67e145d933ab5d4fb1d986d596 /gulpfile.js | |
parent | f7ea5bf7935ace7693e620a15d66a0c51982b488 (diff) | |
parent | 1a60f42933739ae69f7ff0ac4ba56f4f4c9bfff5 (diff) | |
download | tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.tar tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.tar.gz tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.tar.bz2 tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.tar.lz tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.tar.xz tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.tar.zst tangerine-wallet-browser-9b1c07c75045f4a7124e4f0fcd416535f88182ae.zip |
Merge pull request #4111 from MetaMask/build-fix-sourcemaps
Build - fix sourcemaps
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gulpfile.js b/gulpfile.js index 4f0da9d60..e844a4cba 100644 --- a/gulpfile.js +++ b/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 |