12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- // ref: https://umijs.org/config/
- import pageRoutes from './config/router.config';
- import pxToViewPort from 'postcss-px-to-viewport';
- const extraPostCSSPlugins = [
- pxToViewPort({
- viewportWidth: 750,
- unitPrecision: 5,
- viewportUnit: 'vw',
- selectorBlackList: [],
- minPixelValue: 1,
- mediaQuery: false
- })
- ]
- export default {
- // extraPostCSSPlugins,
- treeShaking: true,
- routes: pageRoutes,
- plugins: [
- // ref: https://umijs.org/plugin/umi-plugin-react.html
- ['umi-plugin-react', {
- antd: false,
- dva: true,
- dynamicImport: false,
- title: 'shipping',
- dll: false,
- hd: true,
- routes: {
- exclude: [
- /models\//,
- /services\//,
- /model\.(t|j)sx?$/,
- /service\.(t|j)sx?$/,
- /components\//,
- ],
- },
- }],
- ],
- extraBabelPlugins: [
- ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
- ],
- proxy: {
- '/api-app': {
- target: 'http://xkapi.laylib.com',
- // target: 'https://api.mfxike.com',
- changeOrigin: true,
- //pathRewrite: { '^/service-manage': 'service-manage' },
- },
- '/api-common': {
- target: 'http://xkapi.laylib.com',
- // target: 'https://api.mfxike.com',
- changeOrigin: true,
- //pathRewrite: { '^/service-manage': 'service-manage' },
- },
- },
- outputPath: 'shipping-h5',
- hash: true,
- theme: {
- "brand-primary": '#FF3344',
- "color-text-base": "#333",
- "brand-primary-tap": "#d92136"
- },
- }
|