-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcraco.config.js
57 lines (56 loc) · 1.44 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
const CracoLessPlugin = require('craco-less');
const path = require('path');
module.exports = {
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: {
'@primary-color': '#556ee6',
'@success-color': '#34c38f',
'@warning-color': '#f1b44c',
'@error-color': '#f46a6a',
'@info-color': '#50a5f1',
'@processing-color': '#6485ff',
'@text-color': '#495057',
'@border-radius-base': '6px',
'@btn-border-radius-base': '5px',
'@btn-border-radius-sm': '4px',
'@font-family': 'Rubik, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica, Arial, sans-serif',
},
javascriptEnabled: true,
},
},
},
},
],
webpack: {
configure: (webpackConfig, { env, paths }) => {
paths.appBuild = webpackConfig.output.path = path.resolve('dist');
return webpackConfig;
},
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
},
devServer: {
hot: true,
proxy: {
'/admin/api/v1': {
target: 'http://localhost:8080/',
}
},
historyApiFallback: {
rewrites: [
{ from: /^\/$/, to: '/index.html' },
],
},
},
};