-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
121 lines (117 loc) · 2.61 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 tailwindcss from "@tailwindcss/vite";
import { defaultLocale, localesMap } from "./app/config/i18n.config";
const baseUrl = process.env.NUXT_PUBLIC_APP_BASE_URL!;
export default defineNuxtConfig({
alias: {
"@": fileURLToPath(new URL("./app/", import.meta.url)),
"~": fileURLToPath(new URL("./", import.meta.url)),
},
app: {
layoutTransition: false,
pageTransition: false,
},
colorMode: {
classSuffix: "",
dataValue: "ui-color-scheme",
},
compatibilityDate: "2025-01-01",
components: [{ extensions: [".vue"], path: "@/components", pathPrefix: false }],
css: [
"@fontsource-variable/inter/standard.css",
"@fontsource-variable/inter/standard-italic.css",
"@/styles/index.css",
],
devtools: {
enabled: true,
},
eslint: {
config: {
autoInit: false,
standalone: true,
},
},
experimental: {
componentIslands: {
selectiveClient: true,
},
defaults: {
useAsyncData: {
deep: false,
},
useFetch: {
timeout: 250,
},
},
inlineRouteRules: true,
/**
* @see https://github.com/nuxt-modules/i18n/issues/3240
*/
scanPageMeta: true,
// typedPages: true,
},
features: {
/** @see https://github.com/nuxt/nuxt/issues/21821 */
inlineStyles(id) {
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
return id != null && id.includes(".vue");
},
},
future: {
compatibilityVersion: 4,
},
i18n: {
baseUrl,
defaultLocale,
detectBrowserLanguage: {
redirectOn: "root",
},
experimental: {
typedOptionsAndMessages: "default",
},
langDir: "messages",
lazy: true,
locales: Object.values(localesMap),
strategy: "prefix",
},
imports: {
dirs: ["./config/"],
},
modules: ["@nuxt/eslint", "@nuxt/image", "@nuxtjs/color-mode", "@nuxtjs/i18n", "@vueuse/nuxt"],
nitro: {
compressPublicAssets: true,
prerender: {
routes: ["/manifest.webmanifest", "/robots.txt", "/sitemap.xml"],
},
},
runtimeConfig: {
public: {
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: {
baseUrl: ".",
paths: {
"@/*": ["./app/*"],
"~/*": ["./*"],
},
},
},
},
vite: {
build: {
cssMinify: "lightningcss",
},
plugins: [tailwindcss()],
},
});