-
Notifications
You must be signed in to change notification settings - Fork 1
/
nuxt.config.js
146 lines (135 loc) · 4.05 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
const pkg = require('./package')
module.exports = {
mode: 'universal',
router: {
scrollBehavior: function (to, from, savedPosition) {
let position = false
// savedPosition is only available for popstate navigations (back button)
if (savedPosition) {
position = savedPosition
} else {
position = { x: 0, y: 0 }
}
return new Promise(resolve => {
// wait for the out transition to complete (if necessary)
window.$nuxt.$once('triggerScroll', () => {
// coords will be used if no selector is provided,
// or if the selector didn't match any element.
if (to.hash && document.querySelector(to.hash)) {
// scroll to anchor by returning the selector
position = { selector: to.hash }
}
resolve(position)
})
})
}
},
generate: {
routes: [
'/challenges/maze',
'/challenges/video-sensing',
'/challenges/catch-the-egg',
'/challenges/hat-landing',
'/challenges/pet',
'/challenges/platformer',
'/challenges/label-it',
'/challenges/reaction-time',
'/challenges/arrow-move',
'/challenges/walk',
'/challenges/learn-name',
'/challenges/jump-how-high',
'/challenges/explore-the-atmosphere',
'/collections/',
'/collections/scratch-basics',
'/collections/first-games',
'/collections/science',
'/extension/maze',
'/extension/video-sensing',
'/extension/catch-the-egg',
'/extension/hat-landing',
'/extension/pet',
'/extension/platformer',
'/extension/label-it',
'/extension/reaction-time',
'/extension/arrow-move',
'/extension/walk',
'/extension/learn-name',
'/extension/jump-how-high',
'/extension/explore-the-atmosphere',
'/chrome-extension/popup',
'/how-it-works',
'/contact',
'/about'
]
},
/*
** Headers of the page
*/
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description },
{ property: 'og:image', content: '/pngs/cgfb.png' },
{ name: 'twitter:card', content: '/pngs/cgfb.png' },
{ name: 'twitter:title', content: 'Challenge Galaxy' },
{ name: 'twitter:description', content: pkg.description },
{ name: 'twitter:image', content: '/pngs/cgfb.png' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'~/assets/globalitems.scss'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js modules
*/
modules: [,
// Doc:https://github.com/nuxt-community/modules/tree/master/packages/bulma
'@nuxtjs/style-resources',
'@nuxtjs/bulma',
'vue-scrollto/nuxt',
['@nuxtjs/google-analytics', { id: 'UA-39984374-3' }]
],
styleResources:{
scss: [
'./assets/vars/*.scss',
'./assets/abstracts/_mixins.scss'
]
},
/*
** Build configuration
*/
build: {
extractCSS: {
allChunks: true
},
postcss: {
preset: {
features: {
customProperties: false
}
}
},
/*
** You can extend webpack config here
*/
extend(config, ctx) {
}
}
}