-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
110 lines (97 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
104
105
106
107
108
109
110
// © 2024 INRAE
// SPDX-FileContributor: Marcellino Palerme <[email protected]>
//
// SPDX-License-Identifier: MIT
// https://nuxt.com/docs/api/configuration/nuxt-config
import { defineNuxtConfig } from "nuxt/config";
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
export default defineNuxtConfig({
runtimeConfig: {
// in dev
// be overridden by NUXT_URL_P2M2_API_PARSE environment variable
urlP2m2ApiParse: "http://p2m2ToolsApi:8080/p2m2tools/api/format/parse/",
// be overridden by NUXT_URL_P2M2_API_SNIF environment variable
urlP2m2ApiSnif: "http://p2m2ToolsApi:8080/p2m2tools/api/format/sniffer",
// be overridden by NUXT_PATH_SHARE environment variable
pathShare: "/shareFile",
public:{
// be overridden by NUXT_L_PARTNER environment variable
lPartner: "REPFR,INRAE,IGEPP,P2M2,BIA,IFPC,MTH",
}
},
$production: {
routeRules: {
"/**": { isr: true }
}
},
$development: {
routeRules: {
"/**": { isr: true }
}
},
modules: [
"@nuxt/ui",
"@nuxt/test-utils/module",
"@nuxtjs/eslint-module",
"@nuxtjs/i18n",
(_options, nuxt) => {
nuxt.hooks.hook("vite:extendConfig", (config) => {
// @ts-expect-error : directly from vuetify
config.plugins.push(vuetify({ autoImport: true }));
});
},
"@nuxt/test-utils/module"
],
typescript: {
typeCheck: false
},
i18n: {
defaultLocale: "fr-FR",
strategy: "no_prefix",
locales: [
{
code: "en-US",
name: "English (US)",
files: ["en-US.ts"]
},
{
code: "fr-FR",
name: "Français (France)",
files: ["fr-FR.ts"]
},
],
lazy: false,
langDir: "lang",
// customRoutes: "config", // disable custom route with page components
pages: {
index: {
"en-US": "/",
"fr-FR": "/",
},
calibCurve: {
"en-US": "/calibration_curve",
"fr-FR": "/gammes",
}
}
},
pages:true,
// thx: https://stackoverflow.com/a/77140279
app: {
head: {
link: [{ rel: "icon", href: "/p2m2.ico" }]
},
pageTransition: false,
layoutTransition: false
},
build: {
transpile: ["vuetify"],
},
vite: {
vue: {
template: {
transformAssetUrls,
},
},
},
compatibilityDate: "2024-11-19",
});