-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
62 lines (58 loc) · 1.79 KB
/
nuxt.config.ts
File metadata and controls
62 lines (58 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// https://nuxt.com/docs/api/configuration/nuxt-config
import { resolve } from 'node:path'
export default defineNuxtConfig({
modules: ['@unocss/nuxt', '@nuxt/test-utils/module', '@netlify/nuxt'],
devtools: { enabled: true },
app: {
head: {
htmlAttrs: { lang: 'en' },
title: 'Netlify Cache Inspector',
link: [
{
rel: 'icon',
type: 'image/png',
href: '/favicon-96x96.png',
sizes: '96x96',
},
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
{ rel: 'shortcut icon', href: '/favicon.ico' },
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-touch-icon.png',
},
{ rel: 'manifest', href: '/site.webmanifest' },
],
meta: [
{
name: 'description',
content:
'Inspect and compare HTTP cache headers on Netlify sites. Analyze cache status, CDN behavior, and cache-control directives.',
},
{ name: 'apple-mobile-web-app-title', content: 'ntlcache' },
],
script: [
{
// Prevent FOUC: apply dark class before first paint
innerHTML: `(function(){try{var m=localStorage.getItem('color-mode');if(m==='dark'||(m!=='light'&&matchMedia('(prefers-color-scheme:dark)').matches))document.documentElement.classList.add('dark')}catch(e){}})()`,
},
],
},
},
alias: {
'~server': resolve(__dirname, './server'),
},
routeRules: {
'/': {
prerender: true,
},
'/run/**': {
// Cache each run page, since they're immutable other than new deploys
headers: {
'cache-control': 'public, max-age=0, must-revalidate',
},
},
},
future: { compatibilityVersion: 5 },
compatibilityDate: '2026-03-24',
})