-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
39 lines (38 loc) · 1.33 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 = {
...config.output,
filename: 'bundle.min.js',
publicPath: '/build/',
};
config.resolve = {
extensions: [".js", ".html"],
alias: {
"@observers": path.resolve(__dirname, "src/core/observers"),
"@core": path.resolve(__dirname, "src/core"),
"@views": path.resolve(__dirname, "src/core/views"),
"@components": path.resolve(__dirname, "src/core/views/components"),
"@contexts": path.resolve(__dirname, "src/core/contexts"),
"@factory": path.resolve(__dirname, "src/core/factory"),
"@hooks": path.resolve(__dirname, "src/core/views/hooks"),
"@utils": path.resolve(__dirname, "src/core/utils"),
"@libs": path.resolve(__dirname, "src/libs"),
"@constants": path.resolve(__dirname, "src/core/constants"),
"@translations": path.resolve(__dirname, "src/core/translations"),
"@theme": path.resolve(__dirname, "src/core/theme"),
"@routes": path.resolve(__dirname, "src/core/routes"),
},
};
config.module.rules.push({
test: /\.js$/,
loader: "esbuild-loader",
options: {
loader: "jsx",
target: "es2020",
},
});
return config;
},
};