Skip to content

Commit

Permalink
Use custom webpack uglifyjs options for faster building, Closes #74
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jul 20, 2018
1 parent 6b76193 commit ff45932
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/actor-init-sparql/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const StringReplacePlugin = require("string-replace-webpack-plugin");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
entry: [ 'babel-polyfill', path.resolve(__dirname, 'index-browser.js') ],
Expand Down Expand Up @@ -53,7 +54,18 @@ module.exports = {
]
},
optimization: {
minimize: true,
minimizer: [
// we specify a custom UglifyJsPlugin here to get source maps in production
new UglifyJsPlugin({
cache: true,
parallel: true,
uglifyOptions: {
compress: false,
mangle: true,
},
sourceMap: true
})
]
},
plugins: [
new StringReplacePlugin(),
Expand Down

0 comments on commit ff45932

Please sign in to comment.