-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
97 lines (95 loc) · 1.79 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import { nodePolyfills } from "vite-plugin-node-polyfills";
import "reflect-metadata";
export default defineNuxtConfig({
modules: [
"@nuxtjs/robots",
"@nuxt/image-edge",
"@formkit/nuxt",
"@unocss/nuxt",
"nuxt-headlessui",
"nuxt-icon",
"@vueuse/nuxt",
],
extends: ["nuxt-seo-kit"],
components: ["~/templates", "~/components"],
hooks: {
"nitro:build:before": nitro => {
nitro.options.moduleSideEffects.push("reflect-metadata");
},
},
app: {
head: {
link: [
{
rel: "icon",
href: "/favicon.png",
type: "image/png",
},
],
htmlAttrs: { lang: "en-us" },
},
},
nitro: {
compressPublicAssets: true,
routeRules: {
"/_nuxt/**": {
headers: {
"cache-control": `public,max-age=${
60 * 60 * 24 * 365
},s-maxage=${60 * 60 * 24 * 365}`,
},
},
},
esbuild: {
options: {
tsconfigRaw: {
compilerOptions: {
experimentalDecorators: true,
},
},
},
},
prerender: {
ignore: ["/devices", "/projects", "/blog", "/"],
},
},
image: {
ipx: {
maxAge: 60 * 60 * 24 * 365,
},
},
runtimeConfig: {
public: {
siteUrl:
process.env.NUXT_PUBLIC_SITE_URL || "https://cpluspatch.com",
siteName: "",
siteDescription: "My blog, about me and how you can contact me!",
language: "en-US", // prefer more explicit language codes like `en-AU` over `en`,
titleSeparator: "·",
},
},
vite: {
plugins: [
nodePolyfills({
// To exclude specific polyfills, add them to this list.
exclude: [
],
// Whether to polyfill `node:` protocol imports.
protocolImports: true,
}),
],
resolve: {
extensions: [
".mjs",
".js",
".mts",
".ts",
".jsx",
".tsx",
".json",
".vue",
],
},
},
});