-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
78 lines (77 loc) · 2.44 KB
/
Copy pathnuxt.config.ts
File metadata and controls
78 lines (77 loc) · 2.44 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
import tailwindcss from "@tailwindcss/vite"
export default defineNuxtConfig({
modules: ["@nuxt/fonts", "@nuxt/icon", "@nuxtjs/color-mode", "@nuxtjs/seo", "@pinia/nuxt", "@vueuse/motion/nuxt", "nuxt-auth-utils", "nuxt-shiki"],
runtimeConfig: {
public: {
baseURL: process.env.NUXT_PUBLIC_BASE_URL,
},
session: {
maxAge: 60 * 60 * 24 * 7, // 7 days
password: process.env.NUXT_SESSION_PASSWORD!,
cookie: { httpOnly: true, secure: process.env.NODE_ENV === "production", sameSite: "lax" },
},
},
routeRules: {
"/**": {
headers: {
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Referrer-Policy": "strict-origin-when-cross-origin",
"Permissions-Policy": "camera=(), microphone=(), geolocation=()",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
},
},
},
devServer: { host: "0.0.0.0" },
vite: {
server: {
allowedHosts: [new URL(process.env.NUXT_PUBLIC_BASE_URL!).hostname],
hmr: {
protocol: "wss",
host: new URL(process.env.NUXT_PUBLIC_BASE_URL!).hostname,
port: Number(new URL(process.env.NUXT_PUBLIC_BASE_URL!).port),
},
},
plugins: [tailwindcss() as any],
},
app: {
head: {
script: process.env.NODE_ENV === "production" ? [{ "src": "https://static.cloudflareinsights.com/beacon.min.js", "defer": true, "data-cf-beacon": `{"token": "${process.env.NUXT_CF_BEACON_TOKEN}"}` }] : [],
},
},
css: ["~/assets/styles.css"],
colorMode: {
classSuffix: "",
preference: "system",
fallback: "light",
storageKey: "nuxt-color-mode",
},
fonts: {
processCSSVariables: true,
families: [
{ name: "Roboto", provider: "google", weights: ["300 800"] },
{ name: "Russo One", provider: "google", weights: ["400"] },
{ name: "JetBrains Mono", provider: "google", weights: ["400"] },
],
},
icon: {
mode: "svg",
serverBundle: "remote",
clientBundle: { scan: true },
},
ogImage: {
enabled: false,
},
robots: {
disallow: ["/admin", "/onboarding"],
},
site: {
url: process.env.NUXT_PUBLIC_BASE_URL,
name: "WindKeep",
},
shiki: {
bundledLangs: ["bash", "go", "html", "javascript", "json", "yml", "markdown", "typescript", "vue"],
bundledThemes: ["poimandres"],
highlightOptions: { theme: "poimandres" },
},
})