mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-18 12:09:58 +08:00

### What problem does this PR solve? Feat: Add VariablePickerMenuPlugin to select variables in the prompt text box by menu #4764 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
import path from 'path';
|
|
import TerserPlugin from 'terser-webpack-plugin';
|
|
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',
|
|
'@umijs/plugins/dist/tailwindcss',
|
|
],
|
|
jsMinifier: 'none', // Fixed the issue that the page displayed an error after packaging lexical with terser
|
|
lessLoader: {
|
|
modifyVars: {
|
|
hack: `true; @import "~@/less/index.less";`,
|
|
},
|
|
},
|
|
devtool: 'source-map',
|
|
copy: [
|
|
{ from: 'src/conf.json', to: 'dist/conf.json' },
|
|
{ from: 'node_modules/monaco-editor/min/vs/', to: 'dist/vs/' },
|
|
],
|
|
proxy: [
|
|
{
|
|
context: ['/api', '/v1'],
|
|
target: 'http://127.0.0.1:9380/',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
logger: console,
|
|
// pathRewrite: { '^/v1': '/v1' },
|
|
},
|
|
],
|
|
|
|
chainWebpack(memo, args) {
|
|
memo.module.rule('markdown').test(/\.md$/).type('asset/source');
|
|
|
|
memo.optimization.minimizer('terser').use(TerserPlugin); // Fixed the issue that the page displayed an error after packaging lexical with terser
|
|
|
|
return memo;
|
|
},
|
|
tailwindcss: {},
|
|
});
|