-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
91 lines (80 loc) · 2.03 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
export default defineNuxtConfig({
extends: [
'nuxt-ignis',
],
modules: [
'@nuxtjs/cloudinary',
],
// TODO should be configured in Nuxt Ignis
ssr: false,
runtimeConfig: {
public: {
// default language
lang: 'en',
// excessive logging
debug: false,
// config for image provider
cloudinary: {
baseURL: `https://res.cloudinary.com/${process.env.CLOUDINARY_CLOUD_NAME}/image/upload/`,
preset: 'elrhistory',
folder: 'elrhistory',
},
// fallback config for site description
webTitle: 'ELRHistory',
webAbout: 'This is a welcome text displayed on the index page.<br /><br />It can be <strong>HTML <span style="color: red">formatted</span></strong>.',
webAuthor: 'Alois Sečkár',
webLink: 'https://alois-seckar.cz/',
},
},
vite: {
build: {
rollupOptions: {
output: {
manualChunks(id: string) {
if (id.includes('pinia') || id.includes('Pinia')) {
return 'pinia'
}
},
},
},
},
},
eslint: {
config: {
stylistic: true,
},
},
// for now this is required override of Nuxt Ignis default formkit config
// TODO config should be extensible (has to be solved in upstream)
formkit: {
configFile: './elrhistory-formkit.config.ts',
},
// for now this is required override of Nuxt Ignis default i18n config
// TODO config should be extensible (has to be solved in upstream)
i18n: {
vueI18n: './elrhistory-i18n.config.ts',
},
image: {
cloudinary: {
baseURL: `https://res.cloudinary.com/${process.env.CLOUDINARY_CLOUD_NAME}/image/upload/`,
},
presets: {
thumb: {
modifiers: {
fit: 'cover',
format: 'jpg',
width: 120,
height: 80,
},
},
},
},
// required to allow images from Cloudinary
security: {
headers: {
contentSecurityPolicy: {
'img-src': ['\'self\'', 'https://res.cloudinary.com/'],
},
},
},
})