-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
128 lines (116 loc) · 2.82 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
119
120
121
122
123
124
125
126
127
128
/* eslint-disable camelcase */
// https://nuxt.com/docs/api/configuration/nuxt-config
import { defineNuxtConfig } from 'nuxt/config'
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'@unocss/nuxt',
'@nuxtjs/i18n',
'@pinia/nuxt',
'@vueuse/nuxt',
'@vite-pwa/nuxt',
'@nuxtjs/supabase'
],
imports: {
dirs: ['stores', 'services']
},
routeRules: {
'/demo/spa': { ssr: false },
'/demo/static': { static: true },
'/demo/swr': { swr: true }
},
runtimeConfig: {
public: {
apiBaseUrl: 'https://api.mahali.me'
}
},
nitro: {
routeRules: {
// '/api/v1/**': { proxy: 'https://preview.mahali.me/api/v1/**' }
'/api/v1': { proxy: 'https://mahali-mvp-dev.apps.fr01.paas.tech.orange/api/v1' }
}
},
sourcemap: {
server: true,
client: false
},
css: [
'@unocss/reset/tailwind.css',
'@/assets/styles/main.scss'
],
pinia: {
autoImports: [
// automatically imports `defineStore`
'defineStore', // import { defineStore } from 'pinia'
['defineStore', 'definePiniaStore'] // import { defineStore as definePiniaStore } from 'pinia'
]
},
app: {
head: {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
{ rel: 'icon', href: '/favicon.svg', type: 'images/svg+xml' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' }
],
noscript: [
{ children: 'JavaScript is required' }
]
}
},
i18n: {
defaultLocale: 'fr',
langDir: 'lang',
locales: [
{ code: 'en', iso: 'en-GB', file: 'en.json' },
{ code: 'fr', iso: 'fr-FR', file: 'fr.json' }
],
lazy: true,
precompile: {
strictMessage: false
},
vueI18n: './i18n.config.ts'
},
pwa: {
registerType: 'autoUpdate',
manifest: {
name: 'Mahali',
background_color: '#ffffff',
theme_color: '#5a69e6',
start_url: '/',
scope: '/',
display: 'standalone',
icons: [
{
src: '/android-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/android-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: '/maskable-android-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
},
client: {
installPrompt: true,
// you don't need to include this: only for testing purposes
// if enabling periodic sync for update use 1 hour or so (periodicSyncForUpdates: 3600)
periodicSyncForUpdates: 3600
},
devOptions: {
enabled: true,
type: 'module'
}
}
})