| | |
| | | const path = require('path') |
| | | const CompressionPlugin = require("compression-webpack-plugin") |
| | | const CompressionPlugin = require('compression-webpack-plugin') |
| | | |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir) |
| | |
| | | /* less 变量覆盖,用于自定义 ant design 主题 */ |
| | | 'primary-color': '#1890FF', |
| | | 'link-color': '#1890FF', |
| | | 'border-radius-base': '4px', |
| | | 'border-radius-base': '4px' |
| | | }, |
| | | javascriptEnabled: true, |
| | | javascriptEnabled: true |
| | | }, |
| | | postcss:{ |
| | | plugins:[ |
| | | require('postcss-px-to-viewport')({ |
| | | unitToConvert: "px", |
| | | unitToConvert: 'px', |
| | | viewportWidth: 1920, |
| | | unitPrecision: 3, |
| | | propList: [ |
| | | "*" |
| | | '*' |
| | | ], |
| | | viewportUnit: "vw", |
| | | fontViewportUnit: "vw", |
| | | viewportUnit: 'vw', |
| | | fontViewportUnit: 'vw', |
| | | selectorBlackList: [], |
| | | minPixelValue: 0, |
| | | mediaQuery: false, |
| | | replace: true, |
| | | exclude: /(\/|\\)(node_modules)(\/|\\)/, |
| | | exclude: /(\/|\\)(node_modules)(\/|\\)/ |
| | | }) |
| | | ] |
| | | } |
| | |
| | | // headers: { |
| | | // 'Access-Control-Allow-Origin': '*', |
| | | // }, |
| | | compress: false, |
| | | proxy: { |
| | | /* '/api': { |
| | | target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统 |
| | |
| | | ws: false, |
| | | changeOrigin: true |
| | | }, |
| | | '/chat': { |
| | | target: 'https://836u458t54.vicp.fun', |
| | | ws: false, |
| | | changeOrigin: true |
| | | } |
| | | } |
| | | }, |
| | | |