forked from 7836246/Nuxt-Whois
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
66 lines (65 loc) · 1.75 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
routeRules:{
'/admin/**':{ ssr : false }
},
modules: [
'@nuxt/devtools', // Devtools开发工具
'@nuxtjs/i18n', // 多语言
'@pinia/nuxt', // Pinia 持久化状态管理
'@pinia-plugin-persistedstate/nuxt', // Pinia 持久化状态管理插件
'nuxt-simple-robots',
'nuxt-headlessui', // 组件库
'@bg-dev/nuxt-naiveui', // 组件库
'@nuxtjs/tailwindcss', // 组件库
'nuxt-icon',
'@nuxtjs/color-mode',
],
features:{
inlineStyles: true,
} ,
runtimeConfig: {
public: {
Domain: process.env.WebSiteDomain || 'Nuxt Whois',
DomainSuffix: process.env.WebSiteDomainSuffix || 'Dns',
}
},
app:{
head: {
title: process.env.WebSiteTitle || 'Nuxt Whois',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
}
},
i18n: {
strategy: 'prefix_except_default',
defaultLocale: 'zh',
detectBrowserLanguage: {
useCookie: true,
},
locales: [
{ code: 'zh', iso: 'zh-Hans', file: 'zh.ts' },
{ code: 'en', iso: 'en-US', file: 'en.ts' },
{ code: 'tw', iso: 'zh-Hant', file: 'tw.ts' },
],
langDir: 'lang/',
},
headlessui: {
prefix: 'Headless'
},
naiveui:{
},
colorMode: {
preference: 'system', // default value of $colorMode.preference
fallback: 'light', // fallback value if not system preference found
classPrefix: '',
classSuffix: '-mode',
storageKey: 'nuxt-color-mode'
}
})