generated from acdh-oeaw/template-app-nuxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
121 lines (102 loc) · 2.38 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
import { fileURLToPath } from "node:url";
import { defaultLocale, localesMap } from "./config/i18n.config";
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const baseUrl = process.env.NUXT_PUBLIC_APP_BASE_URL!;
export default defineNuxtConfig({
alias: {
"@": fileURLToPath(new URL("./", import.meta.url)),
},
app: {
layoutTransition: false,
pageTransition: false,
},
colorMode: {
classSuffix: "",
dataValue: "ui-color-scheme",
},
components: [{ path: "@/components", extensions: [".vue"], pathPrefix: false }],
content: {
defaultLocale,
locales: Object.keys(localesMap),
markdown: {},
},
css: [
"@fontsource-variable/inter/standard.css",
"@fontsource-variable/inter/standard-italic.css",
"@/styles/shadcn-ui.css",
"@/styles/index.css",
],
devtools: {
enabled: process.env.NODE_ENV === "development",
},
experimental: {
componentIslands: {
selectiveClient: true,
},
defaults: {
useAsyncData: {
deep: false,
},
useFetch: {
timeout: 250,
},
},
inlineRouteRules: true,
},
features: {
/** @see https://github.com/nuxt/nuxt/issues/21821 */
inlineStyles: false,
},
i18n: {
baseUrl,
defaultLocale,
detectBrowserLanguage: {
redirectOn: "root",
},
langDir: "./messages",
lazy: true,
locales: Object.values(localesMap),
strategy: "prefix_except_default",
vueI18n: "./i18n.config.ts",
},
imports: {
dirs: ["./config/"],
},
modules: ["@nuxt/content", "@nuxt/image", "@nuxtjs/color-mode", "@nuxtjs/i18n", "@vueuse/nuxt"],
nitro: {
compressPublicAssets: true,
prerender: {
routes: ["/manifest.webmanifest", "/robots.txt", "/sitemap.xml"],
},
},
postcss: {
plugins: {
tailwindcss: {},
},
},
runtimeConfig: {
NODE_ENV: process.env.NODE_ENV,
public: {
apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL,
appBaseUrl: process.env.NUXT_PUBLIC_APP_BASE_URL,
bots: process.env.NUXT_PUBLIC_BOTS,
googleSiteVerification: process.env.NUXT_PUBLIC_GOOGLE_SITE_VERIFICATION,
matomoBaseUrl: process.env.NUXT_PUBLIC_MATOMO_BASE_URL,
matomoId: process.env.NUXT_PUBLIC_MATOMO_ID,
redmineId: process.env.NUXT_PUBLIC_REDMINE_ID,
},
},
typescript: {
shim: false,
strict: true,
// https://github.com/nuxt/nuxt/issues/14816#issuecomment-1484918081
tsConfig: {
compilerOptions: {
paths: {
"@/*": ["./*"],
},
},
},
},
compatibilityDate: "2024-08-09",
});