-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathnuxt.config.ts
64 lines (62 loc) · 1.37 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
import process from 'node:process'
// cross origin isolation is required since oxc-parser uses shared array buffer
const crossOriginHeaders = {
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
}
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: ['@unocss/nuxt', '@vueuse/nuxt', 'nuxt-monaco-editor', 'nuxt-umami'],
vite: {
esbuild: {
legalComments: 'external',
},
resolve: {
alias: {
path: 'pathe',
},
},
server: {
headers: crossOriginHeaders,
},
},
nitro: {
routeRules: {
'/**': {
headers: crossOriginHeaders,
},
},
vercel: {
config: {
routes: [
{
src: '.*',
// @ts-expect-error - type dismatch in `nitropack`
headers: crossOriginHeaders,
},
],
},
},
},
devtools: {
enabled: true,
},
css: [
'@unocss/reset/tailwind.css',
'floating-vue/dist/style.css',
'~/styles/vars.css',
'~/styles/global.css',
'~/styles/dropdown.css',
],
imports: {
dirs: ['./composables', './composables/parser', './state', './utils'],
},
umami: {
autoTrack: false,
ignoreLocalhost: true,
},
appConfig: {
branch: process.env.VERCEL_GIT_COMMIT_REF,
},
compatibilityDate: '2024-10-10',
})