ulangi kembali

This commit is contained in:
Irwan Cahyono 2025-08-08 11:28:18 +07:00
parent b9a7231036
commit b8bbe28dd1
3 changed files with 15 additions and 12 deletions

View File

@ -8,7 +8,6 @@ RUN npm install --legacy-peer-deps
COPY . . COPY . .
ENV NUXT_SSR=false
RUN npm run build RUN npm run build
# Dockerfile untuk server Nuxt 3 # Dockerfile untuk server Nuxt 3

View File

@ -9,12 +9,16 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { location /_nuxt/ {
expires 7d; expires 1y;
access_log off;
add_header Cache-Control "public"; add_header Cache-Control "public";
} }
location = /index.html {
expires -1;
add_header Cache-Control "no-store";
}
location ~ /\. { location ~ /\. {
deny all; deny all;
} }

View File

@ -73,13 +73,13 @@ export default defineNuxtConfig({
}, },
ssr: false, ssr: false,
nitro: { // nitro: {
preset: 'static', // Generate file static // preset: 'static', // Generate file static
prerender: { // prerender: {
failOnError: false, // Skip error saat generate // failOnError: false, // Skip error saat generate
ignore: ['/dynamic-route'], // Ignore route tertentu // ignore: ['/dynamic-route'], // Ignore route tertentu
crawlLinks: false // Nonaktifkan crawler // crawlLinks: false // Nonaktifkan crawler
} // }
}, // },
}); });