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 02ae983
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 31 deletions.
23 changes: 21 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -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"
]
}
5 changes: 5 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {})
Expand Down Expand Up @@ -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,
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 02ae983

Please sign in to comment.