chore: Bundle Stats / Webpack v4 (#1448)
* chore: Experiment with bundle size monitoring service * chore: Ensure build runs on CI, move lint and flow before test * chore: Upgrade Webpack v3 -> v4 * chore: Add webpack-cli Remove unused dep Move deps to dev * Move babel deps to production * Move babel deps to production
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* eslint-disable */
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const ManifestPlugin = require('webpack-manifest-plugin');
|
||||
|
||||
commonWebpackConfig = require('./webpack.config');
|
||||
|
||||
productionWebpackConfig = Object.assign(commonWebpackConfig, {
|
||||
cache: true,
|
||||
mode: "production",
|
||||
devtool: 'source-map',
|
||||
entry: ['./app/index'],
|
||||
output: {
|
||||
@@ -19,17 +19,7 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, {
|
||||
});
|
||||
productionWebpackConfig.plugins = [
|
||||
...productionWebpackConfig.plugins,
|
||||
new ManifestPlugin(),
|
||||
new UglifyJsPlugin({
|
||||
sourceMap: true,
|
||||
uglifyOptions: {
|
||||
compress: true,
|
||||
keep_fnames: true
|
||||
}
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
new ManifestPlugin()
|
||||
];
|
||||
|
||||
module.exports = productionWebpackConfig;
|
||||
|
||||
Reference in New Issue
Block a user