forked from idriss-xyz/address-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
30 lines (29 loc) · 870 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
const path = require('path');
const fs = require('fs');
module.exports = env => {
if (env.m == 1) {
return {
mode: "production", // "production" | "development" | "none"
entry: {
"global": "./lib/esnext/bundleGlobal.js",
},
output: {
path: path.resolve(__dirname, 'lib/bundle'),
filename: '[name].js'
},
}
} else {
return {
mode: "production", // "production" | "development" | "none"
entry: {
"module": "./lib/esnext/browser.js",
},
output: {
library: {type: 'module'},
path: path.resolve(__dirname, 'lib/bundle'),
filename: '[name].js'
},
experiments: {outputModule: true},
}
}
}