-
Notifications
You must be signed in to change notification settings - Fork 5
/
nuxt.config.ts
113 lines (96 loc) · 2.47 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
109
110
111
112
113
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
import VueI18nVitePlugin from '@intlify/unplugin-vue-i18n/vite'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
future: {
compatibilityVersion: 4,
},
extends: ['nuxt-umami'],
modules: [
'@nuxtjs/tailwindcss',
'@nuxtjs/color-mode',
'nuxt-icon',
'@vueuse/motion/nuxt',
'@nuxtjs/sanity',
'@vueuse/nuxt',
'@nuxt/image',
'@nuxtjs/google-fonts',
'@nuxtjs/i18n',
],
runtimeConfig: {
public: {
sanityImageBaseUrl: '',
},
},
routeRules: {
'/sanity-image/**': { proxy: 'https://cdn.sanity.io/images/**' },
},
colorMode: {
classSuffix: '',
},
i18n: {
vueI18n: './app/i18n.ts',
locales: [
{ code: 'en', name: 'English' },
{ code: 'zh-CN', name: '简体中文' },
{ code: 'zh-TW', name: '繁體中文' },
],
defaultLocale: 'en',
},
imports: {
dirs: ['providers'],
imports: [
{ from: 'tailwind-variants', name: 'tv' },
{ from: 'tailwind-variants', name: 'VariantProps', type: true },
],
},
build: {
transpile: ['vue-i18n'],
},
vite: {
plugins: [
VueI18nVitePlugin({
include: [resolve(dirname(fileURLToPath(import.meta.url)), './app/locales/**/*.yaml')],
}),
],
},
image: {
format: ['webp', 'jpeg', 'jpg'],
providers: {
mySanity: {
name: 'mySanity',
provider: '~/providers/sanity.ts',
options: {
projectId: process.env.SANITY_STUDIO_PROJECT_ID,
},
},
},
},
typescript: {
shim: false,
tsConfig: {
compilerOptions: {
moduleResolution: 'node',
},
},
},
sanity: {
projectId: process.env.SANITY_STUDIO_PROJECT_ID,
apiVersion: 'v2023-06-21',
},
css: [
'~/assets/css/main.css',
],
googleFonts: {
families: {
'Playfair Display': [600],
'Noto Serif SC': [600],
'BenchNine': [300],
},
display: 'block',
},
devtools: { enabled: true },
compatibilityDate: '2024-07-18',
})