generated from acdh-oeaw/template-app-nuxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
108 lines (106 loc) · 2.26 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
import { fileURLToPath } from "node:url";
import { defaultLocale, locales } from "./src/config/i18n.config";
export default defineNuxtConfig({
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"~": fileURLToPath(new URL("./", import.meta.url)),
},
components: [{ path: "@/components", pathPrefix: false }],
content: {
defaultLocale,
locales: Object.keys(locales),
markdown: {},
},
css: [
"@fontsource-variable/inter/slnt.css",
"tailwindcss/tailwind.css",
"@/styles/index.css",
"vuetify/lib/styles/main.sass",
"@mdi/font/css/materialdesignicons.css",
],
devtools: {
enabled: true,
},
dir: {
public: "../public",
},
imports: {
dirs: ["../stores", "./stores", "types"],
},
experimental: {
componentIslands: true,
},
pinia: {
// @ts-ignore
autoImports: ["defineStore", "acceptHMRUpdate"],
},
piniaPersistedstate: {
cookieOptions: {
sameSite: "strict",
},
// storage: 'localStorage'
},
i18n: {
baseUrl: process.env.NUXT_PUBLIC_APP_BASE_URL,
defaultLocale,
detectBrowserLanguage: {
redirectOn: "root",
},
langDir: "./messages",
lazy: true,
locales: Object.values(locales),
strategy: "prefix",
},
modules: [
"@nuxt/content",
"@nuxt/devtools",
"@nuxtjs/i18n",
"nuxt-vitest",
"@pinia/nuxt",
"@pinia-plugin-persistedstate/nuxt",
],
nitro: {
compressPublicAssets: true,
},
postcss: {
plugins: {
"tailwindcss/nesting": "postcss-nesting",
tailwindcss: {},
autoprefixer: {},
},
},
routeRules: {
"/": { static: true },
"/imprint": { static: true },
},
runtimeConfig: {
BOTS: process.env.BOTS,
ENV_VALIDATION: process.env.ENV_VALIDATION,
NODE_ENV: process.env.NODE_ENV,
public: {
apiBaseUrl: "",
redmineId: "",
NUXT_PUBLIC_APP_BASE_URL: process.env.NUXT_PUBLIC_APP_BASE_URL,
NUXT_PUBLIC_MATOMO_BASE_URL: process.env.NUXT_PUBLIC_MATOMO_BASE_URL,
NUXT_PUBLIC_MATOMO_ID: process.env.NUXT_PUBLIC_MATOMO_ID,
NUXT_PUBLIC_REDMINE_ID: process.env.NUXT_PUBLIC_REDMINE_ID,
},
},
build: {
transpile: ["vuetify"],
},
srcDir: "./src/",
typescript: {
shim: false,
strict: true,
// https://github.com/nuxt/nuxt/issues/14816#issuecomment-1484918081
tsConfig: {
compilerOptions: {
paths: {
"@/*": ["./src/*"],
"~/*": ["./*"],
},
},
},
},
});