forked from nuxt/website-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
77 lines (76 loc) · 2.35 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
const locale = process.env.NUXT_LOCALE || 'en'
export default {
target: 'static',
ssr: true,
// modern: 'client',
head: {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'preconnect', href: 'https://www.google-analytics.com' },
{ rel: 'stylesheet', type: 'text/css', href: 'https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css' }
],
script: [
{ src: 'https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js', async: true, defer: true }
],
bodyAttrs: {
class: ['font-sans font-medium bg-light-surface dark:bg-dark-surface text-light-onSurfacePrimary dark:text-dark-onSurfacePrimary transition-colors duration-300 ease-linear']
}
},
buildModules: [
'@nuxtjs/eslint-module',
// https://github.com/nuxt-community/color-mode-module
'@nuxtjs/color-mode',
// https://github.com/nuxt-community/netlify-files-module
'@nuxtjs/netlify-files',
// https://github.com/nuxt-community/style-resources-module
'@nuxtjs/style-resources',
// https://github.com/Developmint/nuxt-svg-loader/
// 'nuxt-svg-loader',
'@nuxtjs/svg',
// https://github.com/Atinux/nuxt-tailwindcss/
'@nuxtjs/tailwindcss',
// https://pwa.nuxtjs.org
'@nuxtjs/pwa'
],
modules: [
['~/modules/docs/', { port: 3001 }],
// https://http.nuxtjs.org
'@nuxt/http'
],
// Auto import components, see https://github.com/nuxt/components
components: true,
colorMode: {
preference: 'light' // disable system
},
plugins: [
'~/plugins/init.js',
'~/plugins/directives',
'~/plugins/intersection-observer.client.js',
'~/plugins/vue-observe-visibility.client.js',
'~/plugins/ga.client.js',
'~/plugins/adblock.client.js',
'~/plugins/newsletter.client.js'
],
env: {
DEPLOY_PRIME_URL: process.env.DEPLOY_PRIME_URL || false,
URL: process.env.URL || false,
DOC_SEARCH_API_KEY: process.env.DOC_SEARCH_API_KEY || 'ff80fbf046ce827f64f06e16f82f1401',
NUXT_API: process.env.NUXT_API || 'https://api.nuxtjs.com',
LOCALE: locale
},
manifest: {
lang: locale
},
loading: { color: '#41B883' },
generate: {
fallback: '404.html', // for Netlify
interval: 50
},
static: {
ignore: ['docs']
}
}