1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- /*******覆盖create-react-app默认配置******/
- const path = require('path');
- const resolve = dir => path.resolve(__dirname,dir);
- const CracoLessPlugin = require('craco-less');
- module.exports = {
- devServer: (devServerConfig, { env, paths, proxy, allowedHost }) => {
- //devServerConfig.historyApiFallback=true;
- devServerConfig.proxy={
- '/security-center':'http://192.168.2.237:8871',
- '/daqe-center':'http://192.168.2.237:8871',
- //pathRewrite: {'/' : ''},
- changeOrigin: true,
- };
- return devServerConfig;
- },
- 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/store/actions'),
- '@reducers':resolve('src/store/reducers'),
- '@api':resolve('src/api'),
- /*'parchment': resolve('node_modules/parchment/src/parchment.ts'),
- 'quill': resolve('node_modules/quill/quill.js'),*/
- }
- },
- plugins: [
- {
- plugin: CracoLessPlugin,
- options: {
- styleLoaderOptions:{},
- cssLoaderOptions:{},
- lessLoaderOptions: {
- lessOptions: {
- modifyVars: {
- '@primary-color': '#1690FF',
- '@theme-bg-color':'#fff',
- '@link-color': '#1690FF', // 链接色
- '@success-color': '#52c41a', // 成功色
- '@warning-color': '#FE9748', // 警告色
- '@error-color': '#FF4D4D', // 错误色
- '@font-size-base': '14px', // 主字号
- '@heading-color': '#333', // 标题色
- '@text-color': '#333', // 主文本色
- '@text-color-secondary': '#666', // 次文本色
- '@disabled-color': '#999', // 失效色
- '@border-radius-base': '2px', // 组件/浮层圆角
- '@border-color-base': '#DEE2E9', // 边框色
- '@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,
- },
- },
- },
- },
- ],
- };
|