This commit is contained in:
Irwan Cahyono 2025-08-08 12:53:23 +07:00
parent a2b4212af5
commit 94c8351994
2 changed files with 13 additions and 14 deletions

View File

@ -3,23 +3,18 @@ server {
server_name localhost; server_name localhost;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html;
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ =404;
add_header Cache-Control "no-cache";
} }
location /_nuxt/ { location = / {
expires 1y; try_files /index.html =404;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires max;
add_header Cache-Control "public"; add_header Cache-Control "public";
} }
location ~ /\. {
deny all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
} }

View File

@ -1,6 +1,7 @@
export default defineNuxtConfig({ export default defineNuxtConfig({
app: { app: {
baseURL: '/', baseURL: '/',
buildAssetsDir: '/_nuxt/',
head: { head: {
title: 'Freekake Admin', title: 'Freekake Admin',
titleTemplate: '%s | Freekake Admin', titleTemplate: '%s | Freekake Admin',
@ -49,6 +50,9 @@ export default defineNuxtConfig({
}, },
vite: { vite: {
server: {
hmr: false
},
optimizeDeps: { include: ['quill'] }, optimizeDeps: { include: ['quill'] },
}, },