2021-05-12 06:35:00 +00:00
|
|
|
import { Configuration, DefinePlugin } from 'webpack';
|
|
|
|
import baseConfig from './webpack.config.base';
|
2016-04-20 02:14:53 +00:00
|
|
|
|
2021-05-12 06:35:00 +00:00
|
|
|
const configuration: Configuration = {
|
2016-04-20 06:09:46 +00:00
|
|
|
...baseConfig,
|
2017-11-27 02:30:26 +00:00
|
|
|
devtool: false,
|
2018-04-18 18:20:49 +00:00
|
|
|
mode: 'production',
|
2018-05-23 08:32:43 +00:00
|
|
|
optimization: {
|
|
|
|
// Minimization causes lots of small problems in a large project like this so
|
|
|
|
// we'll just disable it.
|
2018-12-12 17:36:11 +00:00
|
|
|
minimize: false,
|
2018-05-23 08:32:43 +00:00
|
|
|
},
|
2016-04-20 06:09:46 +00:00
|
|
|
plugins: [
|
2021-05-12 06:35:00 +00:00
|
|
|
...(baseConfig.plugins || []),
|
|
|
|
new DefinePlugin({
|
2016-04-20 06:09:46 +00:00
|
|
|
__DEV__: false,
|
2016-08-17 22:44:03 +00:00
|
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
2018-12-12 17:36:11 +00:00
|
|
|
'process.env.HOT': JSON.stringify(null),
|
|
|
|
}),
|
|
|
|
],
|
2017-03-03 01:44:07 +00:00
|
|
|
};
|
2021-05-12 06:35:00 +00:00
|
|
|
|
|
|
|
export default configuration;
|