Merge branch 'main' of https://github.com/okxuewei/LightRAG into separator_file_path
This commit is contained in:
commit
a49b7758e1
2 changed files with 18 additions and 2 deletions
6
lightrag/api/webui/index.html
generated
6
lightrag/api/webui/index.html
generated
|
|
@ -20,7 +20,11 @@
|
|||
<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/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>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -4,9 +4,21 @@ import { webuiPrefix } from '@/lib/constants'
|
|||
import react from '@vitejs/plugin-react-swc'
|
||||
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/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
plugins: [react(), tailwindcss(), noCachePlugin()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue