12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- /*******覆盖create-react-app默认配置******/
- const path = require('path');
- const resolve = dir => path.resolve(__dirname,dir);
- const CracoLessPlugin = require('craco-less');
- module.exports = {
- /*devServer:{
- port: 8080,
- proxy: {
- '/api': {
- target: 'http://192.168.2.232:8871/',
- changeOrigin: true,
- secure: false,
- xfwd: false,
- }
- }
- },*/
- webpack:{
- alias:{
- '@':resolve('src'),
- '@common':resolve('src/common'),
- '@components':resolve('src/components'),
- '@utils':resolve('src/utils'),
- '@images':resolve('src/images'),
- '@store':resolve('src/store'),
- '@actions':resolve('src/actions'),
- '@reducers':resolve('src/reducers'),
- '@api':resolve('src/api'),
- }
- },
- plugins: [
- {
- plugin: CracoLessPlugin,
- options: {
- styleLoaderOptions:{},
- cssLoaderOptions:{},
- lessLoaderOptions: {
- lessOptions: {
- modifyVars: {
- '@primary-color': '#1690FF',
- '@theme-bg-color':'#fff',
- '@link-color': '#1690FF', // 链接色
- '@success-color': '#52c41a', // 成功色
- '@warning-color': '#faad14', // 警告色
- '@error-color': '#f5222d', // 错误色
- '@font-size-base': '14px', // 主字号
- '@heading-color': '#333', // 标题色
- '@text-color': '#333', // 主文本色
- '@text-color-secondary': '#666', // 次文本色
- '@disabled-color': '#999', // 失效色
- '@border-radius-base': '2px', // 组件/浮层圆角
- '@border-color-base': '#D8D8D8', // 边框色
- '@box-shadow-base':'0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),0 9px 28px 8px rgba(0, 0, 0, 0.05)',
- },
- javascriptEnabled: true,
- },
- },
- },
- },
- ],
- };
|