forked from FlowindAI/colormagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
101 lines (101 loc) · 2.8 KB
/
nuxt.config.ts
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
export default defineNuxtConfig({
app: {
head: {
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/img/favicon.ico' },
{ rel: 'icon', type: 'image/svg+xml', href: '/img/icon.svg' },
{ rel: 'apple-touch-icon', href: '/img/apple-touch-icon.png' },
{ rel: 'manifest', href: '/manifest.webmanifest' }
],
meta: [
{ name: 'robots', content: 'index, follow' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'googlebot', content: 'index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1' },
{ name: 'bingbot', content: 'index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1' },
{ property: 'og:site_name', content: 'ColorMagic' }
]
}
},
css: [
'@/assets/css/global.css'
],
colorMode: {
preference: 'light'
},
extends: [
'@nuxt/ui-pro'
],
modules: [
'@nuxtjs/google-fonts',
'@nuxt/ui',
'@nuxtjs/plausible',
'@nuxtjs/i18n'
],
tailwindcss: {
viewer: false
},
googleFonts: {
families: {
Inter: [300, 400, 500, 600, 700, 800, 900]
},
display: 'swap'
},
typescript: {
typeCheck: 'build'
},
runtimeConfig: {
nodeEnv: process.env.NODE_ENV,
logLevel: process.env.LOG_LEVEL ?? 'debug',
public: {
nodeEnv: process.env.NODE_ENV,
siteUrl: process.env.SITE_URL ?? 'http://localhost:3000',
apiUrl: process.env.SITE_URL !== undefined
? `${process.env.SITE_URL}/api`
: 'http://localhost:3000/api'
}
},
routeRules: {
/** @description add cache time for images to make pagespeed insights happy */
'/_nuxt/**': { headers: { 'cache-control': 'max-age=31536000' } },
'/img/**': { headers: { 'cache-control': 'max-age=31536000' } },
'/palette/explore': { headers: { 'cache-control': 'max-age=0' } },
'/palette/explore/*': { headers: { 'cache-control': 'max-age=0' } },
'/palette/*': { headers: { 'cache-control': 'max-age=2592000' } }
},
compatibilityDate: '2024-09-23',
i18n: {
strategy: 'prefix_except_default',
defaultLocale: 'en',
baseUrl: process.env.SITE_URL ?? 'http://localhost:3000',
detectBrowserLanguage: false,
locales: [
{
code: 'en',
language: 'en-US',
name: 'English',
flag: '🇬🇧'
},
{
code: 'ja',
language: 'ja-JP',
name: 'Japanese',
flag: '🇯🇵'
},
{
code: 'it',
language: 'it-IT',
name: 'Italian',
flag: '🇮🇹'
}
]
},
plausible: {
domain: 'colormagic.club',
apiHost: 'https://plausible.io',
trackLocalhost: false,
autoPageviews: true,
autoOutboundTracking: true
}
});