-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
79 lines (76 loc) · 2.1 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
import { fileURLToPath } from "node:url";
import { defineNuxtConfig } from "nuxt/config";
import { defaultLocale, locales } from "./config/i18n.config";
export default defineNuxtConfig({
alias: {
"@": fileURLToPath(new URL("./", import.meta.url)),
},
components: [{ path: "@/components", extensions: [".vue"], pathPrefix: false }],
content: {
// defaultLocale,
// documentDriven: true,
locales: Object.keys(locales),
markdown: {
anchorLinks: false,
rehypePlugins: ["rehype-mermaid"],
},
},
css: [
"@fontsource-variable/roboto-flex/standard.css",
"tailwindcss/tailwind.css",
"@/styles/index.css",
],
i18n: {
baseUrl: process.env.NUXT_PUBLIC_APP_BASE_URL,
defaultLocale,
detectBrowserLanguage: {
redirectOn: "root",
},
langDir: "./locales",
lazy: true,
locales: Object.values(locales),
strategy: "prefix",
vueI18n: "./i18n.config.ts",
},
modules: ["@nuxt/content", "@nuxt/image", "@nuxtjs/i18n", "nuxt3-leaflet"],
nitro: {
compressPublicAssets: true,
},
plugins: ["@/plugins/query-client.ts"],
postcss: {
plugins: {
"tailwindcss/nesting": {},
tailwindcss: {},
autoprefixer: {},
},
},
routeRules: {
"/": { static: true },
"/imprint": { static: true },
},
runtimeConfig: {
public: {
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,
NUXT_PUBLIC_TYPESENSE_API_KEY: process.env.NUXT_PUBLIC_TYPESENSE_API_KEY,
NUXT_PUBLIC_TYPESENSE_PORT: process.env.NUXT_PUBLIC_TYPESENSE_PORT,
NUXT_PUBLIC_TYPESENSE_PROTOCOL: process.env.NUXT_PUBLIC_TYPESENSE_PROTOCOL,
NUXT_PUBLIC_TYPESENSE_HOST: process.env.NUXT_PUBLIC_TYPESENSE_HOST,
NUXT_PUBLIC_TYPESENSE_COLLECTION_PREFIX: process.env.NUXT_PUBLIC_TYPESENSE_COLLECTION_PREFIX,
},
},
typescript: {
shim: false,
strict: true,
// https://github.com/nuxt/nuxt/issues/14816#issuecomment-1484918081
tsConfig: {
compilerOptions: {
paths: {
"@/*": ["./*"],
},
},
},
},
});