Merge branch 'main' of https://github.com/okxuewei/LightRAG into separator_file_path

This commit is contained in:
xuewei 2025-07-26 00:47:48 +08:00
commit a49b7758e1
2 changed files with 18 additions and 2 deletions

View file

@ -20,7 +20,11 @@
<link rel="modulepreload" crossorigin href="/webui/assets/feature-documents-CqK9afTA.js"> <link rel="modulepreload" crossorigin href="/webui/assets/feature-documents-CqK9afTA.js">
<link rel="stylesheet" crossorigin href="/webui/assets/feature-graph-BipNuM18.css"> <link rel="stylesheet" crossorigin href="/webui/assets/feature-graph-BipNuM18.css">
<link rel="stylesheet" crossorigin href="/webui/assets/index-DwO2XWaU.css"> <link rel="stylesheet" crossorigin href="/webui/assets/index-DwO2XWaU.css">
</head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
</head>
<body> <body>
<div id="root"></div> <div id="root"></div>
</body> </body>

View file

@ -4,9 +4,21 @@ import { webuiPrefix } from '@/lib/constants'
import react from '@vitejs/plugin-react-swc' import react from '@vitejs/plugin-react-swc'
import tailwindcss from '@tailwindcss/vite' import tailwindcss from '@tailwindcss/vite'
// A custom Vite plugin to add cache-control headers to index.html
const noCachePlugin = () => ({
name: 'no-cache',
transformIndexHtml(html: string) {
const cacheControlMeta = `
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />`;
return html.replace('</head>', `${cacheControlMeta}\n</head>`);
},
});
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react(), tailwindcss()], plugins: [react(), tailwindcss(), noCachePlugin()],
resolve: { resolve: {
alias: { alias: {
'@': path.resolve(__dirname, './src') '@': path.resolve(__dirname, './src')