-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcraco.config.js
44 lines (44 loc) · 980 Bytes
/
craco.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
const path = require("path");
module.exports = {
webpack: {
alias: {
"@base": path.resolve(__dirname, "src/base"),
"@config": path.resolve(__dirname, "src/config"),
"@pages": path.resolve(__dirname, "src/pages"),
"@router": path.resolve(__dirname, "src/router"),
"@views": path.resolve(__dirname, "src/views"),
"@port": path.resolve(__dirname, "src/port"),
},
configure: {
module: {
rules: [
{
test: /\.js$/,
type: "javascript/auto",
},
{
test: /\.js$/,
resolve: {
fullySpecified: false,
},
},
],
},
},
},
style: {
modules: {
localIdentName: "Brain_[folder]-[name]_[local]_[hash:base64:8]",
},
css: {
loaderOptions: {
modules: {
exportLocalsConvention: "camelCase",
},
},
},
},
devServer: {
port: 12640,
},
};