-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack_swc.config.js
49 lines (47 loc) · 1011 Bytes
/
webpack_swc.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
37
38
39
40
41
42
43
44
45
46
47
48
49
const common_config = require("./webpack.common");
const config = {
...common_config,
entry: {
"docxyz_swc.umd": "./src/index.js",
},
module: {
rules: [
{
test: /\.(js|mjs)$/,
use: {
loader: "swc-loader"
}
}
]
}
}
module.exports = [
config,
{
...config,
entry: {
"docxyz_swc.iife": "./src/index.js",
"docxyz_swc.iife.min": "./src/index.js",
},
output: {
...config.output,
iife: true,
}
},
{
...config,
entry: {
"docxyz_swc.esm": "./src/index.js",
},
output: {
...config.output,
library: {
//name: 'docxyz',
type: "module"
}
},
experiments: {
outputModule: true
}
}
];