-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
34 lines (31 loc) · 894 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
var webpack = require('webpack');
var path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
const MinifyPlugin = require('babel-minify-webpack-plugin');
module.exports = {
mode: 'production',
entry: './src/index.js',
output: {
filename: 'qquery.min.js',
path: path.resolve(__dirname),
},
plugins: [
new MinifyPlugin({
"keepFnName": true
}, {})
],
optimization: {
minimizer: [
new TerserPlugin({
cache: true,
parallel: true,
sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
keep_classnames: true,
keep_fnames: true,
}
}),
],
}
}