Skip to content

Instantly share code, notes, and snippets.

@sorenlouv
Last active May 6, 2018 20:25
Show Gist options
  • Save sorenlouv/2bcc7d22f15b26574cec75aa3ff3a6c1 to your computer and use it in GitHub Desktop.
Save sorenlouv/2bcc7d22f15b26574cec75aa3ff3a6c1 to your computer and use it in GitHub Desktop.
Browserify, Babel and React
{
"scripts": {
"browserify": "browserify --standalone myModuleName ./src/index.js | uglifyjs --compress --source-map --output dist/index.min.js"
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
]
]
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.46",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.46",
"@babel/preset-env": "^7.0.0-beta.46",
"@babel/preset-react": "^7.0.0-beta.46",
"babelify": "git+https://git@github.com/babel/babelify.git#c5e4d4",
"browserify": "^16.2.0",
"uglify-js": "^3.3.23"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment