diff --git a/.babelrc b/.babelrc index 9b1d5409bc17..4e35f322347b 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,23 @@ { - "presets": [["env", { "targets": { "browsers": [">0.25%", "not ie 11", "not op_mini all"] } } ], "react", "stage-0"], - "plugins": ["transform-runtime", "transform-async-to-generator", "transform-class-properties"] + "presets": [ + [ + "env", + { + "targets": { + "browsers": [ + ">0.25%", + "not ie 11", + "not op_mini all" + ] + }, + } + ], + "react", + "stage-0" + ], + "plugins": [ + "transform-runtime", + "transform-async-to-generator", + "transform-class-properties" + ] } diff --git a/gulpfile.js b/gulpfile.js index c1012d5aa61b..6025c6f41532 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -25,6 +25,8 @@ const uglify = require('gulp-uglify-es').default const pify = require('pify') const gulpMultiProcess = require('gulp-multi-process') const endOfStream = pify(require('end-of-stream')) +const babelify = require('babelify') +const brfs = require('brfs') const packageJSON = require('./package.json') const dependencies = Object.keys(packageJSON && packageJSON.dependencies || {}) @@ -456,6 +458,9 @@ function generateBundler (opts, performBundle) { bundler = bundler.external(opts.externalDependencies) } + bundler.transform(babelify) + bundler.transform(brfs) + // inject variables into bundle bundler.transform(envify({ METAMASK_DEBUG: opts.devMode, diff --git a/package.json b/package.json index b5e275f2fdeb..431d81a96365 100644 --- a/package.json +++ b/package.json @@ -30,35 +30,6 @@ "storybook": "start-storybook -p 6006 -c .storybook", "update-changelog": "./auto-changelog.sh" }, - "browserify": { - "transform": [ - [ - "babelify", - { - "presets": [ - [ - "env", - { - "browsers": [ - ">0.25%", - "not ie 11", - "not op_mini all" - ] - } - ], - "stage-0" - ] - }, - { - "plugins": [ - "transform-class-properties" - ] - } - ], - "reactify", - "brfs" - ] - }, "dependencies": { "@material-ui/core": "1.0.0", "@sentry/browser": "^4.1.1",