-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
61 lines (57 loc) · 1.32 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const CracoAlias = require("craco-alias");
const CracoAntDesignPlugin = require("craco-antd");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const WebpackBar = require("webpackbar");
const path = require("path");
// Don't open the browser during development
process.env.BROWSER = "none";
module.exports = {
webpack: {
plugins: [
new WebpackBar({ profile: true }),
...(process.env.NODE_ENV === "development"
? [new BundleAnalyzerPlugin({ openAnalyzer: false })]
: [])
]
},
plugins: [
{
plugin: CracoAntDesignPlugin,
options: {
customizeThemeLessPath: path.join(
__dirname,
"src/styles/antd.custom.less"
)
}
},
{
plugin: CracoAlias,
options: {
source: "options",
aliases: {
"@src": "src",
"@styles": "src/styles",
"@store": "src/store",
"@root": "src/root",
"@auth": "src/components/auth",
"@styles": "src/styles",
"@ducks": "src/ducks",
"@components": "src/components",
"@utils": "src/utils"
}
}
}
]
};
/*
customizeTheme: {
"@primary-color": "#FF33DA",
"@link-color": "#FF33DA"
}
*/
/*
customizeThemeLessPath: path.join(
__dirname,
"src/styles/antd.custom.less"
)
*/