File size: 1,108 Bytes
e4e6a45 04aba1b 6b8fc2c e4e6a45 6b8fc2c 04aba1b 440a37a fad2ec7 04aba1b 6b8fc2c c4f7231 6b8fc2c 04aba1b 6b8fc2c af3ef26 7ebb7e8 e4e6a45 6b8fc2c |
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 47 48 49 |
import path from 'path';
import { defineConfig } from 'umi';
import routes from './src/routes';
const cMapsDir = path.join(
path.dirname(require.resolve('pdfjs-dist/package.json')),
'cmaps',
);
const standardFontsDir = path.join(
path.dirname(require.resolve('pdfjs-dist/package.json')),
'standard_fonts',
);
export default defineConfig({
outputPath: 'dist',
// alias: { '@': './src' },
npmClient: 'npm',
base: '/',
routes,
publicPath: '/',
esbuildMinifyIIFE: true,
icons: {},
hash: true,
history: {
type: 'browser',
},
plugins: ['@react-dev-inspector/umi4-plugin', '@umijs/plugins/dist/dva'],
dva: {},
lessLoader: {
modifyVars: {
hack: `true; @import "~@/less/variable.less";`,
},
},
proxy: {
'/v1': {
target: 'http://123.60.95.134:9380/',
changeOrigin: true,
// pathRewrite: { '^/v1': '/v1' },
},
},
copy: [
{ from: cMapsDir, to: 'cmaps/' },
{ from: standardFontsDir, to: 'standard_fonts/' },
],
chainWebpack(memo, args) {
console.info(memo);
},
});
|