-
Notifications
You must be signed in to change notification settings - Fork 67
/
webpack.config.js
36 lines (34 loc) · 897 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
36
const webpack = require("webpack");
const path = require('path');
const fs = require('fs');
const TerserPlugin = require('terser-webpack-plugin');
const license = fs.readFileSync('LICENSE', { encoding: "utf8" });
module.exports = {
mode: "production",
entry: "./build/module/picogl.js",
plugins: [
new webpack.BannerPlugin({
banner: license
})
],
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
output: {
comments: /^\**!/i,
},
},
extractComments: false
})
]
},
devtool: "source-map",
output: {
library: "PicoGL",
path: path.resolve(__dirname, "build"),
filename: "picogl.min.js",
libraryTarget: "umd",
libraryExport: "PicoGL"
}
};