mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-10 00:10:56 +08:00
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:
@@ -8,6 +8,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|||||||
const HtmlWebpackInlineSourcePlugin = require(
|
const HtmlWebpackInlineSourcePlugin = require(
|
||||||
'html-webpack-inline-source-plugin'
|
'html-webpack-inline-source-plugin'
|
||||||
);
|
);
|
||||||
|
const MinifyPlugin = require("babel-minify-webpack-plugin");
|
||||||
|
|
||||||
const src = path.resolve('src');
|
const src = path.resolve('src');
|
||||||
const nodeModules = path.resolve('node_modules');
|
const nodeModules = path.resolve('node_modules');
|
||||||
@@ -16,7 +17,7 @@ const publicPath = '/';
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
bail: true,
|
bail: true,
|
||||||
devtool: 'source-map',
|
devtool: 'cheap-source-map',
|
||||||
entry: [ require.resolve('../polyfills/polyfills'), path.join(src, 'index') ],
|
entry: [ require.resolve('../polyfills/polyfills'), path.join(src, 'index') ],
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve('build'),
|
path: path.resolve('build'),
|
||||||
@@ -95,11 +96,7 @@ module.exports = {
|
|||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
|
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
|
||||||
new webpack.optimize.OccurrenceOrderPlugin(),
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new MinifyPlugin(),
|
||||||
compress: { screw_ie8: true, warnings: false },
|
|
||||||
mangle: { screw_ie8: true },
|
|
||||||
output: { comments: false, screw_ie8: true }
|
|
||||||
}),
|
|
||||||
new ExtractTextPlugin('static/css/[name].[contenthash:8].css'),
|
new ExtractTextPlugin('static/css/[name].[contenthash:8].css'),
|
||||||
new SWPrecacheWebpackPlugin({
|
new SWPrecacheWebpackPlugin({
|
||||||
cacheId: 'cellxgene',
|
cacheId: 'cellxgene',
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
"babel-core": "^6.13.2",
|
"babel-core": "^6.13.2",
|
||||||
"babel-eslint": "^7.1.1",
|
"babel-eslint": "^7.1.1",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.2",
|
||||||
|
"babel-minify-webpack-plugin": "^0.3.1",
|
||||||
"babel-plugin-istanbul": "^3.1.2",
|
"babel-plugin-istanbul": "^3.1.2",
|
||||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||||
"babel-plugin-transform-react-constant-elements": "^6.9.1",
|
"babel-plugin-transform-react-constant-elements": "^6.9.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user