-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
109 lines (108 loc) · 2.56 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
// https://nuxt.com/docs/api/configuration/nuxt-config
const isDev = process.env.NODE_ENV === 'development';
export default defineNuxtConfig({
app: {
head: {
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1.0',
title: 'Welcome to SalesCreations',
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
],
}
},
css: ['@/assets/css/main.css'],
modules: [
'@nuxtjs/tailwindcss',
'@vueuse/nuxt',
'@pinia/nuxt',
'nuxt-graphql-client',
'nuxt-simple-sitemap',
'nuxt-lodash',
['@nuxtjs/i18n', {
langDir: 'assets/locales/',
defaultLocale: 'en',
locales: [
{
code: 'en',
name: 'English',
file: 'en.json',
description: 'English',
},
{
code: 'pt-br',
name: 'Brazilian Portuguese',
file: 'pt-br.json',
description: 'Brazilian Portuguese',
}
],
}],
['@nuxtjs/robots', {
rules: {
UserAgent: '*',
Disallow: ['/*.gif', '/*.pdf', '/404.html', '/500.html'],
Allow: ['/', '/work/', '/about/', '/experiments/', '/photograph/', '/writing/']
}
}],
['@storyblok/nuxt', {
accessToken: process.env.ACCESS_TOKEN_SB,
bridge: true,
apiOptions: { region: 'eu' },
useApiClient: true
}],
],
components: {
global: true,
dirs: ['~/components'],
},
runtimeConfig: {
public: {
dribbbleToken: process.env.DRIBBBLE_TOKEN,
unsplashKey: process.env.UNSPLASH_KEY,
accessTokenSb: process.env.ACCESS_TOKEN_SB,
writeCodeSegment: isDev ? process.env.WRITE_CODE_SEGMENT_SANDBOX : process.env.WRITE_CODE_SEGMENT,
'graphql-client': {
clients: {
github: {
host: 'https://api.github.com/graphql',
token: {
value: process.env.GH_TOKEN,
type: 'Bearer',
},
retainToken: true,
}
}
}
}
},
sitemap: {
hostname: 'https://salescreations.com.br',
trailingSlash: true,
include: [
'/work',
'/about',
'/experiments',
'/photograph',
'/writing',
]
},
hooks: {
'vite:extendConfig': (config, { isClient, isServer }) => {
if (isClient)
config.resolve.alias.vue = 'vue/dist/vue.esm-bundler.js'
},
},
nitro: {
prerender: {
crawlLinks: true,
routes: [
'/',
'/work/',
'/about/',
'/experiments/',
'/photograph/',
'/writing/',
]
}
}
})