-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
46 lines (39 loc) 路 994 Bytes
/
webpack.dev.config.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
41
42
43
44
45
46
require("@babel/register");
const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const config = {
mode: 'development',
devtool: 'eval-source-map',
entry: __dirname + '/src/index.js',
output: {
path: __dirname + '/build/dist',
publicPath: '/build/dist/',
filename: 'bundle.js',
},
optimization: {
minimizer: [new UglifyJsPlugin({
sourceMap: true,
uglifyOptions: {
warnings: false,
mangle: true,
ie8: false,
keep_fnames: true,
},
})],
},
module: {
rules : [
{
test: /\.jsx$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
}
]
},
plugins: []
};
module.exports = config;