-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
140 lines (126 loc) · 4.25 KB
/
nuxt.config.ts
File metadata and controls
140 lines (126 loc) · 4.25 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
132
133
134
135
136
137
138
139
140
// https://nuxt.com/docs/api/configuration/nuxt-config
const isDesktopBuild = process.env.NUXT_DESKTOP_BUILD === '1'
export default defineNuxtConfig({
modules: ['@nuxt/eslint', '@nuxt/ui', '@vueuse/nuxt', '@nuxtjs/sitemap', '@nuxtjs/robots'],
ssr: !isDesktopBuild,
// Component names = file name (e.g. LoginForm, ArticleCard), no folder prefix
components: [
{
path: '~/components',
pathPrefix: false,
},
],
devtools: {
enabled: !isDesktopBuild,
},
app: {
head: {
script: [
...(process.env.NODE_ENV === 'production'
? [
{
src: 'https://www.umami.dibodev.fr/script.js',
defer: true,
'data-website-id': 'dcb5d16e-a263-480d-add7-261c6c6c9397',
},
]
: []),
],
},
},
css: ['~/assets/css/main.css'],
site: {
url: process.env.NUXT_PUBLIC_SITE_URL || 'https://goupixdex.dibodev.fr',
name: 'GoupixDex',
},
runtimeConfig: {
public: {
apiBase: process.env.NUXT_PUBLIC_API_BASE || 'http://127.0.0.1:8000',
/** Local Python worker (Vinted / nodriver) — Tauri app only */
vintedLocalBase: process.env.NUXT_PUBLIC_VINTED_LOCAL_BASE || 'http://127.0.0.1:18766',
/** Local Python worker (Amazon invites / nodriver) — mainly desktop app */
amazonLocalBase: process.env.NUXT_PUBLIC_AMAZON_LOCAL_BASE || 'http://127.0.0.1:18768',
/** Local Python worker (Cardmarket panier / nodriver) — desktop app */
cardmarketLocalBase: process.env.NUXT_PUBLIC_CARDMARKET_LOCAL_BASE || 'http://127.0.0.1:18770',
siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'https://goupixdex.dibodev.fr',
githubRepo: process.env.NUXT_PUBLIC_GITHUB_REPO || 'leogu/GoupixDex',
desktopReleaseChannel: process.env.NUXT_PUBLIC_DESKTOP_RELEASE_CHANNEL || 'latest',
githubApiBase: process.env.NUXT_PUBLIC_GITHUB_API_BASE || 'https://api.github.com',
},
},
routeRules: {
'/api/**': {
cors: true,
},
'/settings/members': { redirect: '/users' },
'/settings/users': { redirect: '/users' },
'/settings/users/create': { redirect: '/users' },
'/dashboard': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/downloads': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/articles/**': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/settings/**': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/users': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/amazon-invites': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/setup-password/**': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
'/login': { headers: { 'X-Robots-Tag': 'noindex, nofollow' } },
},
compatibilityDate: '2024-07-11',
nitro: isDesktopBuild
? {
preset: 'static',
}
: undefined,
eslint: {
config: {
stylistic: {
commaDangle: 'never',
braceStyle: '1tbs',
},
},
},
/**
* App desktop / `nuxt generate` : sans SSR, Nuxt Icon utilise le provider `iconify` côté client.
* `clientBundle.scan` embarque les icônes détectées dans les `.vue` (via `@iconify-json/*` local)
* pour éviter chargements partiels / courses au premier rendu.
*/
icon: {
clientBundle: {
scan: true,
sizeLimitKb: 1024,
// Icônes définies dans `computed()` (sidebar) : les inclure explicitement
// pour le bundle client desktop / `nuxt generate`.
icons: ['lucide:hard-drive-download', 'lucide:download', 'lucide:scan-line', 'lucide:eraser', 'lucide:trash-2'],
},
},
robots: {
groups: [
{
userAgent: '*',
allow: ['/'],
disallow: [
'/dashboard',
'/downloads',
'/articles',
'/articles/**',
'/settings',
'/settings/**',
'/users',
'/amazon-invites',
'/setup-password/**',
'/login',
],
},
],
sitemap: ['/sitemap.xml'],
},
/**
* Manual sitemap: do not use includeAppSources (all `pages/` routes),
* or internal or demo routes get indexed.
* Add only marketing / public URLs you want crawled.
*/
sitemap: {
sitemaps: false,
includeAppSources: false,
urls: ['/', '/request'],
},
})