Skip to content

Commit

Permalink
Merge branch 'nono-minify-js'
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dz committed Mar 9, 2017
2 parents ec520b8 + 7a522b4 commit ba4285d
Show file tree
Hide file tree
Showing 3 changed files with 357 additions and 335 deletions.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
["env", {
"targets": {
"chrome": 42,
"browsers": ["last 2 versions"]
"browsers": ["last 2 versions"],
"node": 4
},
"useBuiltIns": true
}]
Expand Down
9 changes: 9 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ if (NODE_TARGET === 'node') {
new webpack.ProvidePlugin({ 'btoa': 'btoa' }),
new webpack.EnvironmentPlugin(Object.keys(process.env))
]
} else {
config.plugins = [
new webpack.optimize.UglifyJsPlugin({
mangle: true,
compress: {
warnings: false
}
})
]
}

module.exports = config
Loading

0 comments on commit ba4285d

Please sign in to comment.