-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
72 lines (71 loc) · 1.57 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
62
63
64
65
66
67
68
69
70
71
72
const CracoLessPlugin = require('craco-less');
module.exports = {
modules: {
localIdentName: ''
},
css: {
loaderOptions: (cssLoaderOptions, { env, paths }) => {
return cssLoaderOptions;
}
},
sass: {
loaderOptions: (sassLoaderOptions, { env, paths }) => {
return sassLoaderOptions;
}
},
eslint: {
enable: true /* (default value) */,
mode: 'extends' /* (default value) */ || 'file',
configure: (eslintConfig, { env, paths }) => {
return eslintConfig;
},
pluginOptions: (eslintPluginOptions, { env, paths }) => {
return eslintPluginOptions;
}
},
babel: {
presets: [],
plugins: [],
loaderOptions: (babelLoaderOptions, { env, paths }) => {
return babelLoaderOptions;
}
},
typescript: {
enableTypeChecking: true /* (default value) */,
},
webpack: {
alias: {},
plugins: {
add: [],
remove: []
},
configure: (webpackConfig, { env, paths }) => {
return webpackConfig;
}
},
jest: {
babel: {
addPresets: true /* (default value) */,
addPlugins: true /* (default value) */
},
configure: (jestConfig, { env, paths, resolve, rootDir }) => {
return jestConfig;
}
},
devServer: (devServerConfig, { env, paths, proxy, allowedHost }) => {
return devServerConfig;
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: { '@primary-color': '#845f3f' },
javascriptEnabled: true
}
}
}
}
]
};