-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.config.js
34 lines (32 loc) · 913 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
const TerserPlugin = require('terser-webpack-plugin')
module.exports = (env) => {
const plugins = (env && env.production) ? ["transform-remove-console"] : []
return {
entry: "./src/entry.js",
output: {
path: __dirname + "/dist/unpacked/",
filename: "stop-scrolling.js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
options: { plugins }
}
]
},
optimization: {
minimize: true,
minimizer: [new TerserPlugin({
terserOptions: {
output: {
comments: false,
},
},
extractComments: false
})]
}
}
}