diff --git a/nginx-frontend.conf b/nginx-frontend.conf index 1964ef1..28b25fb 100644 --- a/nginx-frontend.conf +++ b/nginx-frontend.conf @@ -19,6 +19,15 @@ http { index index.html; include /etc/nginx/mime.types; try_files $uri $uri/ /index.html; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires "0"; + } + + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { + root /usr/share/nginx/html; + expires 1h; + add_header Cache-Control "public"; } } } diff --git a/vite.config.js b/vite.config.js index 58ff10a..2820635 100644 --- a/vite.config.js +++ b/vite.config.js @@ -21,7 +21,6 @@ export default defineConfig(({ mode }) => { Vue({ template: { transformAssetUrls } }), - // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme Vuetify(), Components(), ViteFonts({ @@ -57,6 +56,16 @@ export default defineConfig(({ mode }) => { '.vue', ], }, + build: { + outDir: 'dist', + rollupOptions: { + output: { + entryFileNames: 'assets/[name].[hash].js', + chunkFileNames: 'assets/[name].[hash].js', + assetFileNames: 'assets/[name].[hash].[ext]' + } + } + }, server: { port: 3000, },