Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import path from 'path';
  2. import { defineConfig } from 'umi';
  3. import { appName } from './src/conf.json';
  4. import routes from './src/routes';
  5. export default defineConfig({
  6. title: appName,
  7. outputPath: 'dist',
  8. alias: { '@parent': path.resolve(__dirname, '../') },
  9. npmClient: 'npm',
  10. base: '/ss-ragflow/',
  11. routes,
  12. publicPath: '/ss-ragflow/',
  13. esbuildMinifyIIFE: true,
  14. icons: {},
  15. hash: true,
  16. favicons: ['/logo.svg'],
  17. clickToComponent: {},
  18. history: {
  19. type: 'browser',
  20. },
  21. exportStatic: {},
  22. plugins: [
  23. '@react-dev-inspector/umi4-plugin',
  24. '@umijs/plugins/dist/tailwindcss',
  25. ],
  26. jsMinifier: 'terser',
  27. lessLoader: {
  28. modifyVars: {
  29. hack: `true; @import "~@/less/index.less";`,
  30. },
  31. },
  32. devtool: 'source-map',
  33. copy: [
  34. { from: 'src/conf.json', to: 'dist/conf.json' },
  35. { from: 'node_modules/monaco-editor/min/vs/', to: 'dist/vs/' },
  36. ],
  37. proxy: [
  38. {
  39. context: ['/ss-ragflow-api/api', '/ss-ragflow-api/v1'],
  40. target: 'http://pi16:8321',
  41. changeOrigin: true,
  42. ws: true,
  43. logger: console,
  44. // pathRewrite: { '^/ss-ragflow-api/api': '/api', '^/ss-ragflow-api/v1': '/v1' },
  45. },
  46. ],
  47. chainWebpack(memo, args) {
  48. memo.module.rule('markdown').test(/\.md$/).type('asset/source');
  49. return memo;
  50. },
  51. tailwindcss: {},
  52. });