-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
123 lines (109 loc) · 3.05 KB
/
nuxt.config.ts
File metadata and controls
123 lines (109 loc) · 3.05 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
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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
$development: {
ssr: false
},
imports: {
presets: [
{
from: "vee-validate",
imports: ["useForm"],
},
],
},
nitro: {
preset: 'cloudflare_pages',
prerender: {
routes: ['/sitemap.xml'],
crawlLinks: true,
autoSubfolderIndex: false
}
},
css: ["~/assets/css/main.css"],
modules: [
"@nuxtjs/plausible",
"@nuxtjs/tailwindcss",
"@nuxtjs/sitemap",
"@nuxt/content",
"nuxt-route-meta",
"nuxt-security",
"@nuxt/image",
"@nuxtjs/robots",
],
plausible: {
domain: "nutshell-lab.com",
apiHost: "https://plausible.nutshell-lab.com",
},
site: {
url: "https://nutshell-lab.com",
},
content: {
database: {
type: 'd1',
bindingName: 'DB'
}
},
security: {
headers: {
contentSecurityPolicy: {
'script-src': [
"'wasm-unsafe-eval'",
"'self'", // Fallback value, will be ignored by most modern browsers (level 3)
"https:", // Fallback value, will be ignored by most modern browsers (level 3)
"'unsafe-inline'", // Fallback value, will be ignored by almost any browser (level 2)
"'strict-dynamic'", // Strict CSP via 'strict-dynamic', supported by most modern browsers (level 3)
"'nonce-{{nonce}}'" // Enables CSP nonce support for scripts in SSR mode, supported by almost any browser (level 2)
],
'style-src': [
"'self'", // Enables loading of stylesheets hosted on same origin
"https:", // For increased security, replace by the specific hosting domain or file name of your external stylesheets
"'unsafe-inline'" // Recommended default for most Nuxt apps
],
'base-uri': ["'none'"],
'img-src': ["'self'", "data:"], // Add relevant https://... sources if you load images from external sources
'font-src': ["'self'", "https:", "data:"], // For increased security, replace by the specific sources for fonts
'object-src': ["'none'"],
'script-src-attr': ["'none'"],
'upgrade-insecure-requests': true
}
}
},
sitemap: {
exclude: ["/mentions-legales", "/faq", "/cgv", "/services"],
},
robots: {
disallow: ['/mentions-legales'],
},
ignore: [
process.env.CF_PAGES == "1" ? "pages/dev/*" : "",
process.env.CF_PAGES == "1" ? "pages/faq.vue" : "",
process.env.CF_PAGES == "1" ? "pages/cgv.vue" : "",
process.env.CF_PAGES == "1" ? "pages/services.vue" : "",
],
app: {
pageTransition: { name: "page", mode: "out-in" },
head: {
htmlAttrs: {
lang: "fr",
},
meta: [
{
name: "theme-color",
content: "#161616",
},
],
link: [
{
rel: "icon",
href: "/favicon.ico",
},
{
rel: "apple-touch-icon",
href: "/apple-touch-icon.png",
},
],
},
},
compatibilityDate: "2024-09-16",
});