generated from ncsa/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.js
40 lines (34 loc) · 974 Bytes
/
webpack.prod.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const Webpack = require('webpack');
const { merge } = require('webpack-merge');
const commonConfig = require('./webpack.common');
module.exports = merge(commonConfig, {
mode: 'production',
devtool: 'source-map',
module: {
rules: [
{
// Use babel-loader for ts, tsx, js, and jsx files
test: /\.[tj]sx?$/,
exclude: /node_modules/,
use: [
'babel-loader',
// {
// // Show eslint messages in the output
// loader: 'eslint-loader',
// options: {
// emitWarning: true
// }
// }
]
},
]
},
optimization: {
minimize: true
},
plugins: [
new Webpack.DefinePlugin({
ENV: JSON.stringify('production')
})
]
});