-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
57 lines (54 loc) · 1.77 KB
/
nuxt.config.ts
File metadata and controls
57 lines (54 loc) · 1.77 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
import tailwindcss from '@tailwindcss/vite';
const cacheTTL = 60 * 60 * 24 * 365; // 1 year – you can set this to whatever you want
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2025-06-14',
future: {
compatibilityVersion: 4,
},
sourcemap: true,
devtools: { enabled: true },
app: {
head: {
link: [{ rel: 'icon', href: '/favicon.ico' }],
},
},
css: ['~/assets/css/main.css'],
nitro: {
compressPublicAssets: true,
routeRules: {
'/img/**': { headers: { 'cache-control': `public,max-age=${cacheTTL},s-maxage=${cacheTTL}` } },
'/_nuxt/**': { headers: { 'cache-control': `public,max-age=${cacheTTL},s-maxage=${cacheTTL}` } },
},
},
vite: {
plugins: [
tailwindcss(),
{
apply: 'build',
name: 'vite-plugin-ignore-sourcemap-warnings',
configResolved(config) {
const originalOnWarn = config.build.rollupOptions.onwarn;
config.build.rollupOptions.onwarn = (warning, warn) => {
if (warning.code === 'SOURCEMAP_BROKEN' && warning.plugin === '@tailwindcss/vite:generate:build') {
return;
}
if (originalOnWarn) {
originalOnWarn(warning, warn);
} else {
warn(warning);
}
};
},
},
],
},
modules: ['@nuxtjs/seo', '@nuxt/eslint', '@nuxt/icon', '@nuxt/fonts', '@vueuse/nuxt', 'nuxt-mcp'],
site: {
// https://nuxtseo.com/
url: 'https://example.com', // TODO: Your site's URL
name: 'Welcome to Nuxt', // TODO: Your site's default meta title
description: 'My awesome Nuxt project', // TODO: Your site's default meta description
defaultLocale: 'en', // TODO: HTML lang attribute value
},
});