| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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: { root: path.resolve('../') },
- 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";`,
- },
- },
- mdx: {
- loader: 'remark-loader',
- },
- 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$/)
- .use('html-loader')
- .loader('html-loader')
- .end()
- .use('remark-loader')
- .loader('remark-loader');
-
- return memo;
- },
- });
|