-
Notifications
You must be signed in to change notification settings - Fork 1
/
craco.config.js
42 lines (42 loc) · 1.19 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
const CracoLessPlugin = require('craco-less');
const path = require('path');
module.exports = {
style: {
postcss: {
mode: 'extends',
loaderOptions: {
postcssOptions: {
ident: 'postcss',
plugins: [
['postcss-pxtorem', {
rootValue: 375 / 10,
propList: ['*']
}],
],
},
},
},
},
webpack: {
alias: {
'@': path.resolve(__dirname, 'src'),
'src': path.resolve(__dirname, 'src'),
'utils': path.resolve(__dirname, 'src/utils'),
'demos': path.resolve(__dirname, 'src/demos'),
'components': path.resolve(__dirname, 'src/components'),
},
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: { '@primary-color': '#1DA57A' },
javascriptEnabled: true,
},
},
},
}
],
};