fix: vite cache refreshing

This commit is contained in:
Rico van Zelst
2023-11-16 11:36:57 +01:00
parent 0f1a10d419
commit 4c3175d337

View File

@@ -1,6 +1,7 @@
import {defineConfig} from 'vite';
import laravel from 'laravel-vite-plugin';
export const hash = Math.floor(Math.random() * 90000) + 10000;
export default defineConfig({
plugins: [
laravel({
@@ -8,4 +9,13 @@ export default defineConfig({
refresh: true,
}),
],
build: {
rollupOptions: {
output: {
entryFileNames: `[name]` + hash + `.js`,
chunkFileNames: `[name]` + hash + `.js`,
assetFileNames: `[name]` + hash + `.[ext]`
}
}
}
});