-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathwebpack.config.js
More file actions
32 lines (31 loc) · 684 Bytes
/
webpack.config.js
File metadata and controls
32 lines (31 loc) · 684 Bytes
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
import path from 'node:path';
import TerserPlugin from 'terser-webpack-plugin';
export default () => ({
mode: 'production',
entry: './src/instacam.js',
output: {
filename: 'instacam.umd.js',
path: path.resolve(import.meta.dirname, 'dist'),
library: 'Instacam',
libraryExport: 'default',
libraryTarget: 'umd',
umdNamedDefine: true,
},
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
format: {
comments: false,
},
mangle: {
properties: {
regex: /^_/,
},
},
},
}),
],
},
});