-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
125 lines (111 loc) · 2.64 KB
/
nuxt.config.js
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
import products from './static/products.json';
const main_base_URL = 'https://apietryga.github.io/bombeltyj';
export default {
ssr: false,
vueuse: {
ssrHandlers: true,
},
router: {
base: '/bombeltyj/',
},
app:{
baseURL: '/bombeltyj/'
},
sitemap: {
hostname: main_base_URL
},
env: {
main_base_URL
},
head () {
const i18nHead = typeof this.$nuxtI18nHead === 'function'
? this.$nuxtI18nHead({ addSeoAttributes: true })
: { htmlAttrs: [], meta: [], link: [] }
return {
title: 'Bombel Tyj',
htmlAttrs: {
lang: this.$i18n?.locale,
...i18nHead.htmlAttrs
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ ['http-equiv'] : "X-UA-Compatible", content : "IE=edge" },
{ name: 'format-detection', content: 'telephone=no' },
{ hid: 'description', name: 'description', content: 'Bubble Tea Rybnik - śląska wersja tajwańskiego napoju - po naszymu!' },
...i18nHead.meta
],
link: [
{ hid: 'apple-touch-icon', rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' },
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
...i18nHead.link
]
}
},
generate : {
generate: { fallback: '404.html' },
routes: products.map( product => {
return {
route : `/story/${product.name}`,
payload: product
}
})
},
styleResources: {
scss: ['./assets/style/*.scss']
},
components: true,
loading: '~/components/app/loader.vue',
buildModules: [
"@nuxt/typescript-build",
'@nuxtjs/google-analytics'
],
modules: [
'@nuxtjs/style-resources',
'@nuxtjs/i18n',
'@nuxtjs/axios',
//'@nuxtjs/sitemap' // sitemap always at the end of this arr
],
googleAnalytics: {
id: process.env.GOOGLE_ANALYTICS_ID,
},
publicRuntimeConfig: {
googleAnalytics: {
id: process.env.GOOGLE_ANALYTICS_ID
}
},
i18n: {
locales: [
{
code: 'sl',
name: 'Ślonsko godka',
file: 'sl.json',
},
{
code: 'pl',
name: 'Polski',
file: 'pl.json',
},
{
code: 'ua',
name: 'українська',
file: 'ua.json',
},
{
code: 'en',
name: 'English',
file: 'en.json',
}
],
defaultLocale: 'pl',
langDir: '@/assets/lang/',
lazy: true,
strategy: 'no_prefix',
baseUrl: 'https://bombeltyj.pl',
silentTranslationWarn: true
},
// for @error on imgs
render: {
fallback: false
}
}