-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
116 lines (115 loc) · 3.02 KB
/
nuxt.config.ts
File metadata and controls
116 lines (115 loc) · 3.02 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
import vuetify from 'vite-plugin-vuetify'
// 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 },
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: {
provider: 'customProxy',
providers: {
customProxy: {
provider: '~/providers/custom-proxy',
options: {
baseURL: '',
},
},
},
},
imports: {
autoImport: true,
},
modules: [
'@nuxtjs/i18n',
'@nuxt/image',
'@pinia/nuxt',
'@kevinmarrec/nuxt-pwa',
async (_options: any, nuxt: any) => {
nuxt.hooks.hook('vite:extendConfig', (config: any) =>
config.plugins.push(vuetify()))
},
'@sentry/nuxt/module',
],
runtimeConfig: {
public: {
cypress: process.env.CYPRESS,
appHost: process.env.NUXT_PUBLIC_APP_HOST,
appTheme: process.env.NUXT_PUBLIC_APP_THEME,
appProject: process.env.NUXT_PUBLIC_APP_PROJECT,
genericApiEndpoint: process.env.NUXT_PUBLIC_GENERIC_API_ENDPOINT,
apiSearch: process.env.NUXT_PUBLIC_API_SEARCH,
apiAddr: process.env.NUXT_PUBLIC_API_ADDR,
apiExport: process.env.NUXT_PUBLIC_API_EXPORT,
apiQrShortener: process.env.NUXT_PUBLIC_API_QR_SHORTENER,
mapillaryAccessToken: process.env.NUXT_PUBLIC_MAPILLARY_ACCESS_TOKEN,
openRouteServiceKey: process.env.NUXT_PUBLIC_OPEN_ROUTE_SERVICE_KEY,
sentryDsn: process.env.NUXT_PUBLIC_SENTRY_DSN,
sentryEnvironment: process.env.NUXT_PUBLIC_SENTRY_ENVIRONMENT,
trackingEnabled: process.env.NUXT_PUBLIC_TRACKING_ENABLED,
},
},
plugins: [
'@/plugins/fontawesome.ts',
'@/plugins/touch.ts',
{ src: '@/plugins/tracking.ts', mode: 'client' },
{ src: '@/plugins/pinia-shared-state.ts', mode: 'client' },
],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
pwa: {
icon: false,
meta: false,
manifest: false,
workbox: {
enabled: false,
},
},
devServer: {
host: '0.0.0.0',
},
typescript: {
typeCheck: 'build',
},
vite: {
optimizeDeps: { exclude: ['fsevents'] },
},
sentry: {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
url: process.env.SENTRY_URL,
telemetry: false,
},
sourcemap: {
client: 'hidden',
},
})