generated from HelpDev/NGO-HelpDev-Storyblok
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.ts
65 lines (62 loc) · 1.58 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
// https://v3.nuxtjs.org/api/configuration/nuxt.config
const accessToken = process.env.STORYBLOK_TOKEN;
import { defaultLocale, getRoutes, locales } from './helpers';
const getRoutesByToken = getRoutes(accessToken);
export default defineNuxtConfig({
css: ['@papanasi/vue/papanasi.css', '~/assets/styles/app.css'],
modules: ['@storyblok/nuxt', '@nuxtjs/google-fonts', '@nuxtjs/i18n', '@pinia/nuxt', '@funken-studio/sitemap-nuxt-3'],
storyblok: {
accessToken
},
postcss: {
plugins: {
'postcss-at-rules-variables': {},
'postcss-import': {},
'postcss-calc': { preserve: false },
'postcss-nested': {},
'postcss-each': {},
'postcss-mixins': {},
autoprefixer: {},
'postcss-discard-comments': {},
'postcss-custom-media': {
importFrom: './assets/styles/variables.css'
}
}
},
i18n: {
strategy: 'prefix_except_default',
locales,
defaultLocale,
detectBrowserLanguage: {
useCookie: false,
alwaysRedirect: true,
redirectOn: 'root'
}
},
googleFonts: {
families: {
Karla: {
wght: [300, 400, 500, 700, 800]
},
Poppins: {
wght: [300, 400, 500, 700, 800]
}
}
},
hooks: {
async 'nitro:config'(nitroConfig) {
if (nitroConfig.dev) {
return;
}
const routes = await getRoutesByToken();
nitroConfig.prerender.routes = [...nitroConfig.prerender.routes, ...routes];
}
},
generate: {
// routes check prerender above
},
sitemap: {
hostname: 'https://need-u.org',
routes: getRoutesByToken
}
});