-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
166 lines (151 loc) · 4.95 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
const pkg = require('./package');
module.exports = {
mode: 'universal',
/*
******************************************************************************
** Headers of the page
** TODO: Prun unneeded fonts
******************************************************************************
*/
head: {
title: pkg.longName,
link: [{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Michroma|Montserrat:300|lato:100,300,400,700'
}]
},
/*
** Customize the progress-bar color
*/
loading: {
color: '#e7bb21'
},
/*
******************************************************************************
** Global CSS
******************************************************************************
*/
css: [
'@/assets/styles/main.scss'
],
/*
******************************************************************************
** Plugins to load before mounting the App
******************************************************************************
*/
plugins: [{
src: '~/plugins/vue-mq.js',
ssr: false
}],
/*
******************************************************************************
** Nuxt.js modules
******************************************************************************
*/
modules: [
// Doc: https://github.com/nuxt-community/modules/tree/master/packages/markdownit
'@nuxtjs/markdownit',
// Doc: https://github.com/nuxt-community/axios-module#usage
'@nuxtjs/axios',
// Doc: https://pwa.nuxtjs.org/setup.html
'@nuxtjs/pwa',
// This allows me to import the following files into my vue files.
['nuxt-sass-resources-loader', [
'@/assets/styles/vars/_all.scss',
'@/assets/styles/base/mixins.scss'
]]
],
/*
******************************************************************************
** setting environment variables
******************************************************************************
*/
env: {
cmsApiKey: process.env.COCKPIT_API_KEY || 'INVALID.KEY',
cmsBaseUrl: process.env.COCKPIT_URL || 'http://localhost:4000'
},
/*
******************************************************************************
** Axios module configuration
******************************************************************************
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
},
/*
******************************************************************************
** Build configuration
******************************************************************************
*/
build: {
postcss: {
plugins: {
// Customize `postcss-cssnext` default options
'postcss-cssnext': {
browsers: ['>5%'],
features: {
customProperties: false
}
},
// 'autoprefixer' : {
// },
'postcss-responsive-type': {},
'postcss-hexrgba': {}
}
},
vender: ['vue-mq'],
/*
** 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)/
});
}
}
},
/*
******************************************************************************
** Nuxt Markdown module. Markdownit options defined:
** https://github.com/markdown-it/markdown-it
******************************************************************************
*/
markdownit: {
injected: true,
linkify: true,
breaks: true
},
/*
******************************************************************************
** PWA Module configuration
******************************************************************************
*/
/*
** Meta data https://pwa.nuxtjs.org/modules/meta.html. NOTE: most standard
** meta is automatically included. mobileApplOS is disabled by default.
*/
meta: {},
/*
** Manifest configuration (part of the pwa nuxt module)
*/
manifest: {
name: pkg.longName,
short_name: pkg.name,
display: 'standalone',
background_color: '#000',
theme_color: '#e7bb21',
description: pkg.description,
lang: 'en'
},
/*
** Workerbox options (part of the pwa nuxt module. https://developers.google.com/web/tools/workbox/)
*/
workbox: {
// Workbox options
}
};