-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
116 lines (102 loc) · 1.93 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-07-08',
future: {
compatibilityVersion: 4,
},
modules: [
// Lint
'@nuxt/eslint',
// Utils
'@vueuse/nuxt',
// i18n
'@nuxtjs/i18n',
// UI modules
'@nuxt/icon',
'@nuxtjs/google-fonts',
'@nuxtjs/color-mode',
'@nuxtjs/tailwindcss',
'nuxt-headlessui',
],
app: {
buildAssetsDir: '/_assets/',
rootAttrs: {
id: 'app',
},
head: {
title: 'Website Title',
},
},
googleFonts: {
families: {
Inter: '100..900',
},
},
colorMode: {
classSuffix: '',
},
/**
* Enable `~/components/` everywhere in `~/pages/`
*/
components: [
{
path: '~/pages',
pattern: '*/components/**',
extensions: ['.vue'],
pathPrefix: false,
},
'~/components',
],
/**
* Remove any components routes
*/
hooks: {
'pages:extend': function (pages) {
for (let i = pages.length - 1; i >= 0; i--) {
if (pages[i]!.path.includes('/components/')) {
pages.splice(i, 1)
}
}
},
},
eslint: {
config: {
standalone: false,
},
},
build: {
transpile: [
'@popperjs/core',
'@headlessui/vue',
'trpc-nuxt',
],
},
vite: {
$server: {
build: {
rollupOptions: {
output: {
// hashCharacters: 'base36',
chunkFileNames: '_assets/[hash].js',
assetFileNames: '_assets/[hash][extname]',
},
},
},
},
$client: {
build: {
rollupOptions: {
output: {
// hashCharacters: 'base36',
entryFileNames: '_assets/[hash].js',
chunkFileNames: '_assets/[hash].js',
assetFileNames: '_assets/[hash][extname]',
},
},
},
},
},
devtools: {
enabled: true,
},
})