Use babel-minify-webpack-plugin instead of Uglify

Uglify breaks with ES6 and conflicts with gl-matrix. Moving to babel to minify (which breaks the source-map devtool so move that to cheap-source-map)
This commit is contained in:
Charlotte Weaver
2018-04-06 13:59:48 -07:00
parent 23a71b71df
commit 6c28023783
2 changed files with 4 additions and 6 deletions
+3 -6
View File
@@ -8,6 +8,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require(
'html-webpack-inline-source-plugin'
);
const MinifyPlugin = require("babel-minify-webpack-plugin");
const src = path.resolve('src');
const nodeModules = path.resolve('node_modules');
@@ -16,7 +17,7 @@ const publicPath = '/';
module.exports = {
bail: true,
devtool: 'source-map',
devtool: 'cheap-source-map',
entry: [ require.resolve('../polyfills/polyfills'), path.join(src, 'index') ],
output: {
path: path.resolve('build'),
@@ -95,11 +96,7 @@ module.exports = {
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: { screw_ie8: true, warnings: false },
mangle: { screw_ie8: true },
output: { comments: false, screw_ie8: true }
}),
new MinifyPlugin(),
new ExtractTextPlugin('static/css/[name].[contenthash:8].css'),
new SWPrecacheWebpackPlugin({
cacheId: 'cellxgene',