-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
119 lines (110 loc) · 3.14 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
110
111
112
113
114
115
116
117
118
119
const pkg = require('./package')
let url = 'https://stfrd.com'
let title = pkg.name
let desc = 'We are an agency rooted in film production. Our in-house team of directors, designers and producers is equipped to serve individuals, agencies and brands with creative solutions.'
let unfurl = `${url}/unfurl.jpg`
module.exports = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
titleTemplate: `%s - ${title}`,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'theme-color', content: '#ffffff' },
{ name: 'robots', content: 'all' },
{ hid: 'description', name: 'description', content: desc },
{ hid: 'og:url', property: 'og:url', content: url },
{ hid: 'og:image', property: 'og:image', content: unfurl },
{ hid: 'og:title', property: 'og:title', content: title },
{ hid: 'og:description', property: 'og:description', content: desc },
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' },
{ hid: 'twitter:domain', name: 'twitter:domain', value: url },
{ hid: 'twitter:title', name: 'twitter:title', value: title },
{ hid: 'twitter:description', name: 'twitter:description', value: desc },
{ hid: 'twitter:image', name: 'twitter:image', content: unfurl },
{ hid: 'twitter:url', name: 'twitter:url', value: url }
],
link: [
{ hid: 'image_src', rel: 'image_src', href: unfurl }
],
script: [
{
defer: true,
src: 'https://use.fontawesome.com/releases/v5.0.0/js/all.js'
}
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#3B8070' },
/*
** Global CSS
*/
css: [
{ src: '~assets/styles/main.scss', lang: 'scss' }
],
/*
** Plugins to load before mounting the App
*/
plugins: [
{ src: `~plugins/vue-observe-visibility`, ssr: false },
{ src: `~plugins/vue-lazyload`, ssr: false },
{ src: `~plugins/vue-swiper`, ssr: false },
{ src: `~plugins/scroll-reveal`, ssr: false },
{ src: `~mixins/global` },
{ src: `~plugins/slice-components` },
{ src: `~plugins/utility-components` },
{ src: `~plugins/prismic` }
],
/*
** Nuxt.js modules
*/
modules: [
'@nuxtjs/pwa'
// ['@nuxtjs/google-analytics', { ua: 'UA-*******' }]
],
/*
** Extend the Router
*/
router: {
middleware: ['toggleNavVisibility']
},
/*
** Build configuration
*/
build: {
vendor: ['axios', 'vue-lazyload', 'scrollreveal'],
/*
** You can extend webpack config here
*/
extend (config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
// Webpack config for swiper.js
config.module.rules.push({
test: /\.js$/,
exclude: /node_modules\/(?!(dom7|swiper)\/).*/
})
},
postcss: {
plugins: {
'postcss-cssnext': {
features: {
customProperties: false
}
}
}
}
}
}