-
Notifications
You must be signed in to change notification settings - Fork 5
/
nuxt.config.js
148 lines (139 loc) · 3.6 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'Larsenwork',
htmlAttrs: {
lang: 'en',
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content:
'Andreas Larsen is an ambitious and humble healthcare professional turned developer + designer from Cph, Denmark.',
},
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@larsenwork' },
{ name: 'twitter:creator', content: '@larsenwork' },
{
hid: 'og:image',
property: 'og:image',
content:
'https://res.cloudinary.com/larsenwork/image/upload/v1517138735/andreas.jpg',
},
{ hid: 'og:title', property: 'og:title', content: 'Larsenwork' },
{
hid: 'og:description',
property: 'og:description',
content:
'Andreas Larsen is an ambitious and humble healthcare professional turned developer + designer from Cph, Denmark.',
},
{ name: 'apple-mobile-web-app-title', content: 'Larsenwork' },
{ name: 'application-name', content: 'Larsenwork' },
{ name: 'theme-color', content: '#ee2b7c' },
],
link: [
{
rel: 'preload',
href: '/fonts/gidole-regular.woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
},
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-touch-icon.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/favicon-32x32.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/favicon-16x16.png',
},
{ rel: 'manifest', href: '/manifest.json' },
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#ee2b7c' },
],
},
/*
** Plugins
*/
plugins: [
{ src: '~/plugins/vue-lazyload', ssr: false },
{ src: '~/plugins/eagle' },
],
/*
** Modules
*/
modules: ['@nuxtjs/dotenv'],
/*
** Customize the progress bar color
*/
loading: false,
/*
** Build configuration
*/
build: {
vendor: ['vue-lazyload'],
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static',
generateStatsFile: true,
openAnalyzer: false,
logLevel: 'info',
}),
],
/*
** Run ESLint on save
*/
extend(config, { isDev, isClient }) {
// config.module.rules.push({
// test: /\.(js)$/,
// loader: 'babel-loader',
// include: /(node_modules\/eagle.js)/,
// })
// const babelLoader = config.module.rules.find(
// rule => rule.loader === 'babel-loader'
// )
// babelLoader.exclude = /node_modules\/(?!eagle.js)/
// config.externals = {
// 'highlight.js': 'HighlightJS',
// }
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/,
})
}
},
/*
** PostCSS config
*/
postcss: [
require('postcss-import')(),
require('postcss-custom-media')(),
require('postcss-nesting')(),
require('postcss-easing-gradients')(),
require('autoprefixer'),
],
/*
** Babel config
*/
babel: {},
},
}