-
Notifications
You must be signed in to change notification settings - Fork 195
/
webpack.config.js
54 lines (53 loc) · 1.42 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const path = require("node:path");
module.exports = [
{
mode: "production",
entry: {
main: "./src/js/theme_daux/index.js",
},
output: {
path: path.resolve(__dirname, "themes/daux/js"),
chunkFilename: "[name].mjs",
chunkLoading: "import",
chunkFormat: "module",
},
experiments: {
outputModule: true,
},
},
{
mode: "production",
devtool: "source-map",
entry: {
main: "./src/js/search/index.js",
},
output: {
filename: "search.min.js",
path: path.resolve(__dirname, "daux_libraries"),
chunkFilename: "[name].js",
//chunkLoading: "import",
//chunkFormat: "module",
},
experiments: {
//outputModule: true,
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "swc-loader",
options: {
jsc: {
parser: {
jsx: true,
},
},
},
},
},
],
},
},
];