-
Notifications
You must be signed in to change notification settings - Fork 7
/
nuxt.config.ts
98 lines (84 loc) · 1.99 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
import { currentLocales } from './app/config/i18n'
import { appDescription } from './app/constants/index'
export default defineNuxtConfig({
modules: [
'@vant/nuxt',
'@unocss/nuxt',
'@nuxtjs/color-mode',
'@nuxt/eslint',
'@nuxtjs/i18n',
'@pinia/nuxt',
'pinia-plugin-persistedstate/nuxt',
],
experimental: {
typedPages: true,
},
css: [
'@unocss/reset/tailwind.css',
'./app/styles/vars.css',
'./app/styles/global.css',
'./app/styles/default-theme.css',
],
postcss: {
plugins: {
'autoprefixer': {},
// https://github.com/wswmsword/postcss-mobile-forever
'postcss-mobile-forever': {
appSelector: '#__nuxt',
viewportWidth: 375,
maxDisplayWidth: 600,
// devtools excluded
exclude: /@nuxt/,
rootContainingBlockSelectorList: [
'van-tabbar',
'van-popup',
],
},
},
},
colorMode: {
classSuffix: '',
},
i18n: {
locales: currentLocales,
lazy: true,
strategy: 'no_prefix',
detectBrowserLanguage: false,
langDir: 'locales',
defaultLocale: 'zh-CN',
vueI18n: './app/config/i18n.config.ts',
},
app: {
head: {
viewport: 'width=device-width,initial-scale=1,viewport-fit=cover',
link: [
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
],
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' },
{ name: 'description', content: appDescription },
{ name: 'theme-color', media: '(prefers-color-scheme: light)', content: '#ffffff' },
{ name: 'theme-color', media: '(prefers-color-scheme: dark)', content: '#222222' },
],
},
},
devtools: {
enabled: true,
},
typescript: {
shim: false,
},
features: {
// For UnoCSS
inlineStyles: false,
},
eslint: {
config: {
standalone: false,
},
},
future: {
compatibilityVersion: 4,
},
compatibilityDate: '2024-09-24',
})