You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

import { defineConfig } from 'umi';
import routes from './src/router';
export default defineConfig({
hash: true,
nodeModulesTransform: {
type: 'none',
},
dva: {
immer: true,
hmr: false,
},
dynamicImport: {
loading: '@/pages/Loadings',
},
ignoreMomentLocale: true,
proxy: {
'/api': {
target: 'https://shop-api-dev.bkbackground.com/',
changeOrigin: true,
pathRewrite: {
['^/api']: '/',
},
},
'/bkbupload': {
target: 'https://upload-service-dev.bkbackground.com/',
changeOrigin: true,
pathRewrite: {
['^/bkbupload']: '/',
},
},
'/xapi': {
target: 'https://shop-api-xg.bkbackground.com/',
changeOrigin: true,
pathRewrite: {
['^/xapi']: '/',
},
},
},
// history: { type: "hash" },
routes: routes,
fastRefresh: {},
extraPostCSSPlugins: [
require('postcss-plugin-px2rem')({
mediaQuery: false,
exclude: [/node_modules/],
}),
],
antd: { mobile: false },
chainWebpack: function (config, { webpack }) {
config.module
.rule('media')
.test(/\.(mp3|mp4|otf|ttf)$/)
.use('file-loader')
.loader(require.resolve('file-loader'));
},
});