-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
75 lines (73 loc) · 1.59 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import genSitemap from './scripts/gen-sitemap';
import { genCSVDefsSet } from './scripts/gen-csv-defs-set';
import { locales } from './assets/data/locales';
// 公開時のドメイン(末尾スラッシュなし)
const baseUrl = 'https://sekigae.app';
export default defineNuxtConfig({
compatibilityDate: '2024-09-26',
runtimeConfig: {
locales,
public: {
baseUrl,
},
},
css: [
"@/assets/css/scrollbar.css",
],
modules: [
'@nuxt/ui',
'@nuxtjs/i18n'
],
ui: {
global: true,
},
vite: {
build: {
rollupOptions: {
output: {
manualChunks: {
sekigae: ['./lib/sekigae.ts'],
}
}
}
}
},
i18n: {
baseUrl,
vueI18n: './i18n.config.ts',
locales,
defaultLocale: 'ja',
strategy: 'prefix_and_default',
trailingSlash: true,
lazy: true,
langDir: './../locales',
},
nitro: {
hooks: {
'compiled': genSitemap,
},
prerender: {
routes: [
"/404.html"
],
// 【一時対応】とりあえずビルドできるようにする
failOnError: false,
},
plugins: [
'@/server/plugins/i18nRedirector.ts',
]
},
experimental: {
componentIslands: true,
payloadExtraction: true,
},
features: {
inlineStyles: false,
},
hooks: {
'build:before': async () => {
await genCSVDefsSet();
},
},
})