-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (34 loc) · 941 Bytes
/
webpack.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
const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: './index.js',
mode: 'development',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'src/static/js')
},
node: {
fs: 'empty'
},
plugins: [
/**
* @summary Uses UglifyJS v3 (uglify-es) to minify JavaScript.
*
* @method UglifyJsPlugin
* @see [Webpack.UglifyJsPlugin]{@link https://webpack.js.org/plugins/uglifyjs-webpack-plugin}
*
* @prop {Option} sourceMap true
* @prop {Option} comments false
* @prop {Option} beautify false
*/
new UglifyJsPlugin({
uglifyOptions: {
sourceMap: true,
output: {
comments: false,
beautify: false
},
}
})
]
};