-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
131 lines (116 loc) · 2.53 KB
/
Copy pathnuxt.config.ts
File metadata and controls
131 lines (116 loc) · 2.53 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import tailwindcss from '@tailwindcss/vite'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
'@nuxt/eslint',
'@nuxt/icon',
'@nuxtjs/color-mode',
'@nuxtjs/mdc',
'@nuxthub/core',
'nuxt-auth-utils',
'nuxt-charts',
'shadcn-nuxt'
],
components: [
{ path: '~/components/prose', pathPrefix: false, global: true },
'~/components'
],
devtools: {
enabled: true
},
css: [
'vue-sonner/style.css',
'~/assets/css/main.css'
],
colorMode: {
classSuffix: '',
disableTransition: true
},
mdc: {
headings: {
anchorLinks: false
},
highlight: {
// noApiRoute: true
shikiEngine: 'javascript'
},
components: {
map: {
root: 'span'
}
}
},
sourcemap: {
server: false,
client: false
},
experimental: {
viewTransition: true
},
compatibilityDate: '2025-04-01',
nitro: {
experimental: {
openAPI: true
}
},
hub: {
db: {
dialect: 'sqlite',
driver: 'd1',
connection: { databaseId: 'a56dcbdf-7730-4f2b-ade9-26feb9461aba' },
applyMigrationsDuringBuild: false
},
blob: {
driver: 'cloudflare-r2',
binding: 'BLOB',
bucketName: 'stackhacker-ui-chat'
}
},
vite: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
plugins: [tailwindcss() as any],
build: {
chunkSizeWarningLimit: 1500
},
css: {
devSourcemap: false
},
optimizeDeps: {
include: [
'striptags',
'@ai-sdk/vue',
'ai',
'shiki-stream/vue',
'shiki',
'shiki/engine-javascript.mjs'
]
}
},
hooks: {
// Suppress sourcemap warnings from upstream plugins (nuxt:module-preload-polyfill,
// @tailwindcss/vite) that do not generate sourcemaps for their transformations.
'vite:extendConfig'(config) {
const customLogger = config.customLogger as
{ warn: (...args: unknown[]) => void } | undefined
if (customLogger) {
const originalWarn = customLogger.warn.bind(customLogger)
customLogger.warn = (msg: unknown, ...args: unknown[]) => {
if (typeof msg === 'string' && msg.includes('Sourcemap is likely to be incorrect')) return
originalWarn(msg, ...args)
}
}
}
},
eslint: {
config: {
stylistic: {
commaDangle: 'never',
braceStyle: '1tbs'
}
}
},
shadcn: {
prefix: '',
componentDir: './app/components/ui'
}
})