From 81fa0742f7e1702eae866c1915319b0de3a2430d Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 2 Mar 2018 10:32:53 -0800 Subject: Fix inpage provider name regression Fixes #3372 by not minifying the name of our inpage provider, which some people were using to identify MetaMask (not our preferred, supported method of web3.currentProvider.isMetaMask). --- gulpfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index 3ade82f87..adfb148a9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -407,7 +407,9 @@ function bundleTask(opts) { // loads map from browserify file .pipe(gulpif(debug, sourcemaps.init({ loadMaps: true }))) // Minification - .pipe(gulpif(opts.isBuild, uglify())) + .pipe(gulpif(opts.isBuild, uglify({ + mangle: { reserved: [ 'MetamaskInpageProvider' ] }, + }))) // writes .map file .pipe(gulpif(debug, sourcemaps.write('./'))) // write completed bundles -- cgit v1.2.3