generated from productdevbook/oku-nuxt3-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
90 lines (82 loc) · 2.09 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
import { defineNuxtConfig } from 'nuxt'
import presetIcons from '@unocss/preset-icons'
export default defineNuxtConfig({
srcDir: 'src',
modules: [
'@vueuse/nuxt',
'@nuxtjs/tailwindcss',
// pinia plugin - https://pinia.esm.dev
'@pinia/nuxt',
// unocss plugin - https://github.com/unocss/unocss
'@unocss/nuxt',
'@intlify/nuxt3',
// 一键换肤 https://color-mode.nuxtjs.org/
'@nuxtjs/color-mode',
],
app: {
buildAssetsDir: 'static', // 静态文件、打包的js、css文件存放路径
baseURL: '/profile-nuxtjs/', // 生成的index.html 引用静态文件增加路径前缀
},
// rootDir: 'docs',
// outputDir: 'docs',
// buildDir: 'docs',
// buildDir: 'profile-nuxtjs',
// router: {
// // mode: 'hash',
// base: '/profile-nuxtjs'
// },
// generate: {
// // buildDir: 'profile-nuxtjs',
// dir: 'docs', // gh_pages/ instead of dist/
// // subFolders: true // 运行nuxt generate将为每个路由创建一个目录并生成index.html文件
// },
// env: {
// // baseUrl: process.env.BASE_URL || '/profile-nuxtjs',
// BASE_URL: process.env.BASE_URL,
// NODE_ENV: process.env.NODE_ENV
// },
build: {
// publicPath: 'https://zuxian.github.io/profile-nuxtjs',
transpile: ['@headlessui/vue'],
},
unocss: {
uno: false,
preflight: false,
icons: true,
presets: [
presetIcons({
scale: 1.2,
extraProperties: {
display: 'inline-block',
},
}),
],
safelist: ['i-twemoji-flag-us-outlying-islands', 'i-twemoji-flag-turkey'],
},
// localization - i18n config
intlify: {
localeDir: 'locales',
vueI18n: {
locale: 'en-US',
fallbackLocale: 'en-US',
availableLocales: ['en-US', 'tr-TR'],
sync: true,
},
},
typescript: {
tsConfig: {
compilerOptions: {
strict: true,
types: ['@pinia/nuxt', '@intlify/nuxt3', './type.d.ts'],
},
},
},
colorMode: {
classSuffix: '',
fallback: 'light',
storageKey: 'color-mode',
},
vite: {
logLevel: 'info',
},
})