-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnuxt.config.ts
93 lines (89 loc) · 2.52 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import type { NuxtConfig } from "nuxt/config";
const modules: NuxtConfig["modules"] = [
["nuxt-typed-router", { strict: true }],
"@nuxt/devtools",
// Use TS-path as workaround (See https://github.com/nuxt/nuxt/issues/20912)
"~/modules/figma2tailwind/index.ts", // Must be placed before "@nuxtjs/tailwindcss"
"~/modules/icons/module.ts",
"@nuxtjs/tailwindcss",
"@nuxtjs/i18n",
"@nuxtjs/color-mode",
"@nuxt/test-utils/module",
["@pinia/nuxt", { autoImports: ["defineStore"] }],
"@pinia-plugin-persistedstate/nuxt",
"@vueuse/nuxt",
"@nuxtjs/plausible",
];
if (process.env.ELECTRON) modules.push("nuxt-electron");
export default defineNuxtConfig({
modules,
runtimeConfig: {
public: {
apiUrl: "https://bmm-api.brunstad.org",
authUrl: "https://login.bcc.no",
clientId: "L9891KdcqtoKmHg4r65lT7zbSjv55dNN",
applicationInsights: "",
systemName: process.env.ELECTRON ? "Electron" : "Web",
isMac: process.platform === "darwin",
mediaSupportEmail: "[email protected]",
sentry: {
dsn: "",
},
},
},
spaLoadingTemplate: "spa-loading-template.html",
i18n: {
strategy: "no_prefix",
skipSettingLocaleOnNavigate: true,
defaultLocale: "en",
},
imports: {
dirs: ["stores"],
},
// TODO: Remove after https://github.com/nuxt-modules/i18n/issues/2000 is fixed
ssr: false,
vite: {
// https://stackoverflow.com/a/75655669/517914
optimizeDeps: { exclude: ["fsevents"] },
},
app: {
pageTransition: { name: "page", mode: "out-in" },
head: {
base: { href: "/" },
meta: [{ name: "description", content: "{{MetadataPlaceholder}}" }],
link: [
{ href: "https://fonts.googleapis.com", rel: "preconnect" },
{
href: "https://fonts.gstatic.com",
rel: "preconnect",
crossorigin: "anonymous",
},
{
href: "https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800&display=swap",
rel: "stylesheet",
},
],
},
},
router: {
options: {
// Setting app.head.base changes the default for "hashMode" to "true" ...
hashMode: false,
},
},
colorMode: {
classSuffix: "",
},
// TODO: Option is marked as invalid if env ELECTRON is not enabled, because this enables the module which allows the configuration.
electron: {
build: [
{
entry: "electron/main.ts",
},
{
entry: "electron/preload.ts",
},
],
},
});