-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
39 lines (38 loc) · 1.34 KB
/
config-overrides.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
const path = require("path");
module.exports = {
webpack: function (config) {
config.devtool = "source-map";
config.output.filename = "static/js/bundle.js";
config.mode = 'development';
config.optimization = {
minimize: false,
};
config.resolve = {
extensions: [".js", ".html"],
alias: {
"@actions": path.resolve(__dirname, "src/core/actions"),
"@core": path.resolve(__dirname, "src/core"),
"@views": path.resolve(__dirname, "src/core/views"),
"@components": path.resolve(__dirname, "src/core/views/components"),
"@factory": path.resolve(__dirname, "src/core/factory"),
"@hooks": path.resolve(__dirname, "src/core/hooks"),
"@features": path.resolve(__dirname, "src/core/views/features"),
"@constants": path.resolve(__dirname, "src/core/constants"),
"@contexts": path.resolve(__dirname, "src/core/contexts"),
"@utils": path.resolve(__dirname, "src/utils"),
"@observers": path.resolve(__dirname, "src/core/observers"),
"@theme": path.resolve(__dirname, "src/core/theme"),
"@src": path.resolve(__dirname, "src"),
},
};
config.module.rules.push({
test: /\.js$/,
loader: "esbuild-loader",
options: {
loader: "jsx",
target: "es2020",
},
});
return config;
},
};