-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
69 lines (67 loc) · 1.35 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'@nuxtjs/apollo',
'@nuxt/ui',
'@nuxt/image',
'@nuxt/eslint',
'nuxt-svgo',
'@nuxt/fonts',
'nuxt-og-image',
],
apollo: {
clients: {
default: {
httpEndpoint: 'https://beta.pokeapi.co/graphql/v1beta',
},
},
},
typescript: {
shim: false,
},
image: {
format: ['webp'],
screens: {
'xs': 320,
'sm': 640,
'md': 768,
'lg': 1024,
'xl': 1280,
'xxl': 1536,
'2xl': 1536,
},
domains: ['raw.githubusercontent.com'],
},
colorMode: {
preference: 'dark',
},
nitro: {
prerender: {
failOnError: false,
crawlLinks: true,
routes: [
'/',
],
},
},
routeRules: {
// Homepage pre-rendered at build time
'/': { prerender: true },
'/api/**': { cors: true },
},
hooks: {
'components:extend': function (components) {
for (const comp of components) {
if (comp.global)
comp.global = 'sync'
}
},
},
site: {
url: 'https://pokemonuxt.vercel.app/' || 'http://localhost:3000',
name: 'Pokemon Nuxt',
description: 'Welcome to Pokemon Nuxt Web App ',
defaultLocale: 'en', // not needed if you have @nuxtjs/i18n installed
},
})