-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
95 lines (81 loc) · 1.74 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
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import IntroxdResolver from '@introxd/components/resolver'
import components from 'unplugin-vue-components/vite'
const r = (path: string) => fileURLToPath(new URL(path, import.meta.url))
const isCloudflarePagesMode
= typeof process.env.BUILD_MODE === 'undefined'
|| process.env.BUILD_MODE === 'cloudflare-pages'
export default defineNuxtConfig({
modules: [
'@vueuse/nuxt',
'@unocss/nuxt',
'floating-vue/nuxt',
...(isCloudflarePagesMode ? ['@nuxthub/core'] : [])
],
lodash: {
prefix: '_',
prefixSkip: false,
upperAfterPrefix: false
},
css: [
'@unocss/reset/tailwind.css'
],
...(isCloudflarePagesMode
? {
hub: {
cache: true
}
}
: {}),
nitro: {
preset: process.env.BUILD_MODE
},
imports: {
dirs: [
'composables/**'
],
imports: [
...[
'IconTextFont',
'IconTextPreset'
].map(name => ({
name,
from: `@introxd/components`
}))
]
},
runtimeConfig: {
env: {
NAVIDROME_API_URL: process.env.NAVIDROME_API_URL,
NAVIDROME_USERNAME: process.env.NAVIDROME_USERNAME,
NAVIDROME_PASSWORD: process.env.NAVIDROME_PASSWORD
} as Record<string, string>
},
typescript: {
tsConfig: {
include: [
'./lib-components.d.ts'
]
}
},
vite: {
plugins: [
components({
dts: r('./.nuxt/lib-components.d.ts'),
resolvers: [
IntroxdResolver()
]
})
],
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler'
}
}
}
},
compatibilityDate: '2024-07-25',
devtools: { enabled: false }
})