-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnuxt.config.js
More file actions
76 lines (69 loc) · 1.23 KB
/
nuxt.config.js
File metadata and controls
76 lines (69 loc) · 1.23 KB
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
module.exports = {
/*
** Build configuration
*/
build: {
extend(config, ctx) {
if (ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/,
});
}
},
},
/*
** Headers
** Common headers are already provided by @nuxtjs/pwa preset
*/
head: {
title: 'Nuxt Element Apollo Boilerplate',
},
css: [
'element-ui/lib/theme-chalk/display.css',
],
plugins: [
{ src: './plugins/element-ui.js' },
],
router: {
scrollBehavior(to, from, savedPosition) {
if (to.hash) {
return {
selector: to.hash,
offset: { x: 0, y: 10 },
};
}
if (savedPosition) {
return savedPosition;
}
return { x: 0, y: 0 };
},
},
/*
** Customize the progress-bar color
*/
loading: { color: '#3B8070' },
/*
** Customize app manifest
*/
manifest: {
theme_color: '#3B8070',
},
/*
** Modules
*/
modules: [
'@nuxtjs/pwa',
'@nuxtjs/apollo',
],
apollo: {
clientConfigs: {
default: {
// required
httpEndpoint: 'http://localhost:4000',
},
},
},
};