This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
forked from nuxt/website-v2
-
Notifications
You must be signed in to change notification settings - Fork 3
/
nuxt.config.ts
138 lines (136 loc) · 3.48 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
import { resolve } from 'path'
import { withDocus } from 'docus'
// Learn more at https://docus.dev
export default withDocus({
rootDir: __dirname,
head: {
title: 'NuxtJS',
link: [
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=DM+Serif+Display:ital@0;1&display=swap'
},
{ rel: 'preconnect', href: 'https://fonts.gstatic.com' }
],
meta: [
{ hid: 'og:site_name', property: 'og:site_name', content: 'Nuxt.js' },
{ hid: 'og:type', property: 'og:type', content: 'website' },
{ hid: 'twitter:site', name: 'twitter:site', content: '@nuxt_js' },
{
hid: 'twitter:card',
name: 'twitter:card',
content: 'summary_large_image'
},
{
hid: 'og:image',
property: 'og:image',
content: 'https://nuxtjs.org/preview.png'
},
{
hid: 'og:image:secure_url',
property: 'og:image:secure_url',
content: 'https://nuxtjs.org/preview.png'
},
{
hid: 'og:image:alt',
property: 'og:image:alt',
content: 'Nuxt.js'
},
{
hid: 'twitter:image',
name: 'twitter:image',
content: 'https://nuxtjs.org/preview.png'
}
],
bodyAttrs: {
class: ['min-w-xs']
}
},
css: [resolve(__dirname, './assets/nuxt.css')],
buildModules: ['@nuxt/typescript-build'],
plugins: ['~/plugins/adblock.client'],
windicss: {
root: resolve(__dirname),
config: resolve(__dirname, 'windi.config.js')
},
/**
* Add image domains for nuxt-image on Vercel
*/
hooks: {
generate: {
async done() {
try {
if (!process.env.VERCEL) return
const { copy } = await import('fs-extra').then((r) => r.default || r)
const src = resolve(__dirname, '.vercel_build_output')
const dest = resolve(__dirname, '../.vercel_build_output')
await copy(src, dest)
} catch {
// eslint-disable-next-line no-console
console.log('Issue copying `.vercel_build_output` to project root.')
}
}
}
},
vite: {
optimizeDeps: {
include: ['cookie', 'js-cookie', 'property-information', 'clipboard'],
exclude: ['lokidb']
}
},
image: {
screens: {
avatarSm: 24,
avatarLg: 48,
logo: 32,
migration: 536,
blogImage: 864
},
domains: [
'strapi.nuxtjs.org',
'tailwindcss.nuxtjs.org',
'storybook.nuxtjs.org',
'firebase.nuxtjs.org',
'pwa.nuxtjs.org',
'image.nuxtjs.org',
'http.nuxtjs.org',
'cloudinary.nuxtjs.org',
'i18n.nuxtjs.org',
'snipcart.nuxtjs.org',
'prismic.nuxtjs.org',
'google-analytics.nuxtjs.org',
'color-mode.nuxtjs.org',
'mdx.nuxtjs.org',
'sanity.nuxtjs.org',
'speedcurve.nuxtjs.org',
'pbs.twimg.com',
'source.unsplash.com',
'images.unsplash.com',
'github.com',
'unsplash.com',
'user-images.githubusercontent.com',
'abs.twimg.com',
'https://res.cloudinary.com/nuxt/'
]
},
i18n: {
langDir: 'i18n/',
locales: [
{
code: 'en',
iso: 'en-US',
file: 'en-US.js',
name: 'English'
},
{
code: 'fr',
iso: 'fr-FR',
file: 'fr-FR.js',
name: 'Français'
}
]
},
build: {
transpile: ['ohmyfetch']
}
})