mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-01 16:15:07 +08:00
Fix: Issues and style fixes related to the 'Memory' page (#12469)
### What problem does this PR solve? Fix: Some bugs - Issues and style fixes related to the 'Memory' page - Data source icon replacement - Build optimization ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -61,6 +61,9 @@ export default defineConfig(({ mode, command }) => {
|
||||
server: {
|
||||
port: 9222,
|
||||
strictPort: false,
|
||||
hmr: {
|
||||
overlay: false,
|
||||
},
|
||||
proxy: {
|
||||
'/api/v1/admin': {
|
||||
target: 'http://127.0.0.1:9381/',
|
||||
@ -77,18 +80,63 @@ export default defineConfig(({ mode, command }) => {
|
||||
assetsInclude: ['**/*.md'],
|
||||
base: env.VITE_BASE_URL,
|
||||
publicDir: 'public',
|
||||
cacheDir: './node_modules/.vite-cache',
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'react',
|
||||
'react-dom',
|
||||
'react-router',
|
||||
'antd',
|
||||
'axios',
|
||||
'lodash',
|
||||
'dayjs',
|
||||
],
|
||||
exclude: [],
|
||||
force: false,
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
assetsDir: 'assets',
|
||||
assetsInlineLimit: 4096,
|
||||
experimentalMinChunkSize: 30 * 1024,
|
||||
chunkSizeWarningLimit: 1000,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
// if (id.includes('src/components')) {
|
||||
// return 'components';
|
||||
// }
|
||||
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.includes('node_modules/d3')) {
|
||||
return 'd3';
|
||||
}
|
||||
if (id.includes('node_modules/ajv')) {
|
||||
return 'ajv';
|
||||
}
|
||||
if (id.includes('node_modules/@antv')) {
|
||||
return 'antv';
|
||||
}
|
||||
const name = id
|
||||
.toString()
|
||||
.split('node_modules/')[1]
|
||||
.split('/')[0]
|
||||
.toString();
|
||||
if (['lodash', 'dayjs', 'date-fns', 'axios'].includes(name)) {
|
||||
return 'utils';
|
||||
}
|
||||
if (['@xmldom', 'xmlbuilder '].includes(name)) {
|
||||
return 'xml-js';
|
||||
}
|
||||
return name;
|
||||
}
|
||||
},
|
||||
chunkFileNames: 'chunk/js/[name]-[hash].js',
|
||||
entryFileNames: 'entry/js/[name]-[hash].js',
|
||||
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
||||
},
|
||||
plugins: [],
|
||||
treeshake: true,
|
||||
},
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
@ -108,6 +156,8 @@ export default defineConfig(({ mode, command }) => {
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
cssCodeSplit: true,
|
||||
target: 'es2015',
|
||||
},
|
||||
esbuild: {
|
||||
tsconfigRaw: {
|
||||
@ -118,5 +168,6 @@ export default defineConfig(({ mode, command }) => {
|
||||
},
|
||||
},
|
||||
},
|
||||
entries: ['./src/main.tsx'],
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user