mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-11-30 00:46:16 +00:00
Revert "Add no-cache headers to index.html via custom Vite plugin"
This reverts commit 93ce53394fe9d0f479870278b3e02ef9338d92e5.
This commit is contained in:
parent
b3c2987006
commit
10b55dbdc7
@ -4,21 +4,9 @@ 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(), noCachePlugin()],
|
||||
plugins: [react(), tailwindcss()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user