-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
59 lines (58 loc) · 1.39 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
import Components from 'unplugin-vue-components/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
export default defineNuxtConfig({
app: {
head: {
link: [
{
rel: "stylesheet",
href: "https://cdn.jsdelivr.net/npm/tw-elements/dist/css/tw-elements.min.css",
},
],
script: [
{
src: 'https://cdn.jsdelivr.net/npm/tw-elements/dist/js/tw-elements.umd.min.js',
async: true,
body: true,
defer: true
}
]
},
},
ssr: true,
modules: [
'@vueuse/nuxt',
'@pinia/nuxt',
"@pinia-plugin-persistedstate/nuxt",
'nuxt-windicss',
],
experimental: {
reactivityTransform: true,
inlineSSRStyles: false,
},
build: {
transpile:
process.env.NODE_ENV === 'production'
? [
'naive-ui',
'vueuc',
'@css-render/vue3-ssr',
'@juggle/resize-observer',
]
: ['@juggle/resize-observer'],
},
vite: {
optimizeDeps: {
include:
process.env.NODE_ENV === 'development'
? ['naive-ui', 'vueuc', 'date-fns-tz/esm/formatInTimeZone']
: [],
},
plugins: [
Components({
resolvers: [NaiveUiResolver()], // Automatically register all components in the `components` directory
}),
],
ssr: { noExternal: ['@nuxtjs/vite'] }
},
})