File size: 1,001 Bytes
1006946 b2b0160 a1d0b3e b2b0160 db736e5 a740b6f b2b0160 739dd81 17c457d b2b0160 f850783 a1d0b3e f850783 b2b0160 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
import path from 'path';
import { defineConfig } from 'umi';
import { appName } from './src/conf.json';
import routes from './src/routes';
export default defineConfig({
title: appName,
outputPath: 'dist',
alias: { '@parent': path.resolve(__dirname, '../') },
npmClient: 'npm',
base: '/',
routes,
publicPath: '/',
esbuildMinifyIIFE: true,
icons: {},
hash: true,
favicons: ['/logo.svg'],
clickToComponent: {},
history: {
type: 'browser',
},
plugins: ['@react-dev-inspector/umi4-plugin'],
jsMinifier: 'terser',
lessLoader: {
modifyVars: {
hack: `true; @import "~@/less/index.less";`,
},
},
devtool: 'source-map',
copy: ['src/conf.json'],
proxy: {
'/v1': {
target: 'http://127.0.0.1:9456/',
changeOrigin: true,
ws: true,
logger: console,
// pathRewrite: { '^/v1': '/v1' },
},
},
chainWebpack(memo, args) {
memo.module.rule('markdown').test(/\.md$/).type('asset/source');
return memo;
},
});
|