Revert "Add no-cache headers to index.html via custom Vite plugin"
This reverts commit 93ce53394f.
This commit is contained in:
parent
b3c2987006
commit
10b55dbdc7
1 changed files with 1 additions and 13 deletions
|
|
@ -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…
Add table
Reference in a new issue