-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathnuxt.config.ts
118 lines (102 loc) · 2.68 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
117
118
import { resolve } from 'node:path'
import { commonAlias } from '../../packages/shared/node'
import { pwa } from './app/config/pwa'
import { appDescription } from './app/constants/index'
const alias = commonAlias as Record<string, string>
export default defineNuxtConfig({
// ssr: false,
routeRules: {
'/': { ssr: false },
},
alias: {
'@advjs/editor': `${resolve(__dirname, '.')}`,
...alias,
},
modules: [
'@vueuse/nuxt',
'@unocss/nuxt',
'@pinia/nuxt',
'@nuxtjs/color-mode',
'@vite-pwa/nuxt',
'@advjs/gui/nuxt',
'nuxt-monaco-editor',
],
future: {
compatibilityVersion: 4,
},
experimental: {
// when using generate, payload js assets included in sw precache manifest
// but missing on offline, disabling extraction it until fixed
payloadExtraction: false,
renderJsonPayloads: true,
typedPages: true,
},
compatibilityDate: '2024-08-14',
css: [
'@unocss/reset/tailwind.css',
'~/styles/index.scss',
],
colorMode: {
classSuffix: '',
preference: 'dark',
fallback: 'dark',
},
nitro: {
esbuild: {
options: {
target: 'esnext',
},
},
prerender: {
crawlLinks: false,
routes: ['/'],
ignore: ['/hi'],
},
},
app: {
head: {
viewport: 'width=device-width,initial-scale=1',
link: [
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
{ rel: 'icon', type: 'image/svg+xml', href: '/nuxt.svg' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' },
],
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'description', content: appDescription },
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
],
script: [
// https://clarity.microsoft.com/
{
type: 'text/javascript',
innerHTML: `(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "kq50mx5ttn");`,
},
],
},
},
components: [
// remove prefix
{ path: '~/components', pathPrefix: false },
{ path: '../../packages/gui/src/components', pathPrefix: false },
],
pwa,
devtools: {
enabled: true,
},
vue: {
compilerOptions: {
isCustomElement: (tag: string) => {
const customElements = [
'model-viewer',
]
return customElements.includes(tag)
},
},
runtimeCompiler: true,
},
})