Skip to content

Commit

Permalink
build - move browserify transforms to gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed Mar 11, 2019
1 parent a07edee commit 8044f49
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 29 deletions.
26 changes: 26 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ 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 reactify = require('reactify')
const brfs = require('brfs')

const packageJSON = require('./package.json')
const dependencies = Object.keys(packageJSON && packageJSON.dependencies || {})
Expand Down Expand Up @@ -456,6 +459,29 @@ function generateBundler (opts, performBundle) {
bundler = bundler.external(opts.externalDependencies)
}

bundler.transform(babelify, {
presets: [
[
'env',
{
'browsers': [
'>0.25%',
'not ie 11',
'not op_mini all',
]
}
],
'stage-0',
],
plugins: [
'transform-class-properties',
],
})

bundler.transform(reactify)

bundler.transform(brfs)

// inject variables into bundle
bundler.transform(envify({
METAMASK_DEBUG: opts.devMode,
Expand Down
29 changes: 0 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8044f49

Please sign in to comment.