-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
103 lines (102 loc) · 2.57 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
import vuetify from 'vite-plugin-vuetify'
import { vidos } from './lib/config'
import { configuredApi, configuredImageProxy } from './utils/vido-config-static'
// Build Configuration (https://nuxt.com/docs/api/nuxt-config)
export default defineNuxtConfig({
build: {
transpile: [
process.env.NODE_ENV === 'production' ? 'maplibre-gl' : '',
'iron-webcrypto',
'punycode',
'pinia',
'vuetify',
'date-fns',
/lodash.*/,
'@fortawesome/vue-fontawesome',
],
},
components: false,
css: ['@fortawesome/fontawesome-svg-core/styles.css'],
devtools: { enabled: true },
gtm: {
pageTracking: false,
},
i18n: {
defaultLocale: 'en',
detectBrowserLanguage: {
useCookie: false,
},
langDir: 'locales',
lazy: true,
locales: [
{ code: 'en', name: 'English', flag: 'GB', iso: 'en-GB', file: 'en-GB.ts' },
{ code: 'es', name: 'Español', flag: 'ES', iso: 'es-ES', file: 'es-ES.ts' },
{ code: 'fr', name: 'Français', flag: 'FR', iso: 'fr-FR', file: 'fr-FR.ts' },
],
strategy: 'no_prefix',
vueI18n: 'config/i18n.config.ts',
},
image: {
domains: [...configuredApi(vidos), ...configuredImageProxy(vidos)],
},
imports: {
autoImport: true,
},
loadingIndicator: false,
modules: [
'@nuxtjs/i18n',
'@nuxt/image-edge',
'@pinia/nuxt',
'@kevinmarrec/nuxt-pwa',
async (_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', config =>
// @ts-expect-error: Do we really need to extend the config ?
config.plugins.push(vuetify()))
},
],
runtimeConfig: {
public: {
// @ts-expect-error: Bad pratice, make it the Nuxt way (https://nuxt.com/docs/guide/going-further/runtime-config)
vidos: vidos.__publicRuntimeConfig__ ? vidos : undefined,
cypress: process.env.CYPRESS,
sentry: {
dsn: undefined,
environment: 'production',
},
},
},
plugins: [
'@/plugins/vido-config.ts',
'@/plugins/fontawesome.ts',
'@/plugins/touch.ts',
{ src: '@/plugins/tracking.ts', mode: 'client' },
'@/plugins/property-translations.ts',
{ src: '@/plugins/pinia-shared-state.ts', mode: 'client' },
],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
purgeCSS: {
whitelistPatterns: [/svg.*/, /fa.*/],
},
pwa: {
icon: false,
meta: false,
manifest: false,
workbox: {
enabled: false,
},
},
server: {
host: '0.0.0.0',
},
typescript: {
typeCheck: 'build',
},
vite: {
optimizeDeps: { exclude: ['fsevents'] },
},
})