ragflow/web/.umirc.ts
balibabu 167b4af52b
feat: Load markdown file with "asset/source" #1739 (#2880)
### What problem does this PR solve?

feat: Load markdown file with "asset/source" #17339

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
2024-10-17 16:03:13 +08:00

46 lines
1001 B
TypeScript

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;
},
});