-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
100 lines (97 loc) · 2.17 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
import * as fs from "fs";
import * as path from "path";
const baseUrl =
process.env.NODE_ENV === "production" && process.env.GITHUB_ACTIONS === "true"
? "/wikitracker/"
: "/";
const link = fs
.readdirSync(path.join(__dirname, "public", "favicon", "light"))
.map((fileName) => ({ fileName, matcher: fileName.match(/\d+x\d+/) }))
.filter(({ matcher }) => matcher !== null)
.map(({ fileName, matcher }) => {
const sizes = (matcher as RegExpMatchArray)[0];
return {
rel: "icon",
type: "image/png",
sizes,
href: `${baseUrl}favicon/light/${fileName}`,
};
});
export default defineNuxtConfig({
imports: {
dirs: ["utils"],
},
app: {
baseURL: baseUrl,
head: {
title: "WikiTracker",
link,
},
},
typescript: {
strict: true,
typeCheck: true,
},
devtools: { enabled: true },
css: ["~/assets/css/main.css"],
modules: [
"@nuxtjs/robots",
[
"@nuxtjs/i18n",
{
langDir: "locales",
lazy: true,
locales: [
{
code: "en",
iso: "en-US",
name: "English",
file: "en.json",
},
{
code: "fr",
iso: "fr-FR",
name: "Français",
file: "fr.json",
},
{
code: "es",
iso: "es-ES",
name: "Español",
file: "es.json",
},
{
code: "ja",
iso: "ja-JA",
name: "日本語",
file: "ja.json",
},
{
code: "ko",
iso: "ko",
name: "한국어",
file: "ko.json",
},
{
code: "he",
iso: "he",
name: "עִברִית",
file: "he.json",
dir: "rtl",
},
],
debug: false,
defaultLocale: "en",
strategy: "prefix",
pages: {},
detectBrowserLanguage: {
alwaysRedirect: false,
fallbackLocale: "en",
redirectOn: "no prefix",
useCookie: false,
},
// vueI18n: './vue-i18n.options.ts'
},
],
],
});