-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
173 lines (158 loc) · 4.14 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
export default defineNuxtConfig({
typescript: {
// typeCheck: true,
strict: true,
},
devtools: {
enabled: import.meta.env.DEV,
},
eslint: {
config: {
standalone: false // <---
}
},
experimental: {
componentIslands: true,
},
routeRules: {
// Homepage pre-rendered at build time
'/': { prerender: true },
'/login': { prerender: true },
'/register': { prerender: true },
// Products page generated on demand, revalidates in background, cached until API response changes
// '/products': { swr: true },
// Product pages generated on demand, revalidates in background, cached for 1 hour (3600 seconds)
// '/products/**': { swr: 3600 },
// Blog posts page generated on demand, revalidates in background, cached on CDN for 1 hour (3600 seconds)
// '/blog': { isr: 3600 },
// Blog post page generated on demand once until next deployment, cached on CDN
// '/blog/**': { isr: true },
// Admin dashboard renders only on client-side
'/admin/**': { ssr: false },
'/addresse/**': { ssr: false },
'/answer/**': { ssr: false },
'/destinataire/**': { ssr: false },
'/evenement/**': { ssr: false },
'/groupe/**': { ssr: false },
'/mon-compte/**': { ssr: false },
'/notifications/**': { ssr: false },
'/paiements/**': { ssr: false },
// Add cors headers on API routes
// '/api/**': { cors: true },
// Redirects legacy urls
// '/old-page': { redirect: '/new-page' }
},
app: {
pageTransition: {
name: 'page',
mode: 'out-in',
},
head: {
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
htmlAttrs: {
lang: 'fr',
},
link: [
{ rel: 'apple-touch-icon', sizes: '76x76', href: 'apple-touch-icon.png' },
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: 'favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: 'favicon-16x16.png' },
],
},
layoutTransition: {
mode: 'out-in',
name: 'layout',
},
},
image: {
dir: 'public',
provider: 'netlify',
domains: [
'https://images.unsplash.com',
'https://source.unsplash.com',
'https://be-right.co/',
],
},
runtimeConfig: {
public: {
siteUrl: 'https://be-right.co/',
siteName: 'Be Right',
siteDescription: 'Révolutionnez votre gestion des droits à l\'image',
language: 'fr',
},
},
extends: [
],
modules: [
'@pinia/nuxt',
'@nuxtjs/tailwindcss',
'nuxt-headlessui',
'nuxt-vitest',
'@pinia-plugin-persistedstate/nuxt',
// 'nuxt-schema-org',
['nuxt-purgecss', {
// attention purgeCss enlève le style de vcalendar
enabled: false, // Always enable purgecss
// safelist: [
// ...(Object.keys(colors).reduce((acc: string[], name) => {
// acc.push(`bg-${name}-50`)
// acc.push(`bg-${name}-100`)
// acc.push(`text-${name}-500`)
// acc.push(`text-${name}-700`)
// acc.push(`border-${name}-500`)
// acc.push(`border-${name}-700`)
// return acc
// }, [])),
// 'bg-gray-800',
// 'text-white',
// ],
}],
'@tailvue/nuxt',
'dayjs-nuxt',
'@nuxt/image',
'@unlok-co/nuxt-stripe',
'@nuxt/eslint',
],
stripe: {
server: {
key: process.env.STRIPE_PRIVATE_KEY,
},
client: {
key: process.env.STRIPE_PUBLIC_KEY,
},
},
dayjs: {
locales: ['en', 'fr'],
plugins: ['relativeTime', 'utc', 'timezone'],
defaultLocale: 'fr',
defaultTimezone: 'Paris/France',
},
piniaPersistedstate: {
cookieOptions: {
sameSite: 'strict',
},
storage: 'localStorage',
},
build: {
transpile: [
'v-calendar',
],
},
plugins: ['~/plugins/global.ts'],
vite: {
optimizeDeps: {
include: [
'@heroicons/vue/**',
'@headlessui/vue',
'@vueuse/components',
'yup',
'vee-validate',
'@vueuse/integrations/useJwt',
'@vueuse/core',
'@unhead/vue',
'vue-signature-pad',
],
},
},
compatibilityDate: '2025-01-03',
})