2018-03-16 16:12:06 +00:00
|
|
|
export default {
|
2017-05-21 17:18:26 +00:00
|
|
|
loading: true,
|
2017-05-14 22:33:31 +00:00
|
|
|
modules: [
|
2017-11-19 14:35:11 +00:00
|
|
|
'~~/modules/basic',
|
2017-10-30 21:39:08 +00:00
|
|
|
'~/modules/hooks',
|
2017-05-31 14:58:36 +00:00
|
|
|
{
|
2017-07-06 22:27:27 +00:00
|
|
|
src: '~/modules/middleware',
|
2017-05-31 14:58:36 +00:00
|
|
|
options: {
|
|
|
|
foo: 'bar'
|
|
|
|
}
|
|
|
|
},
|
2018-01-13 05:22:11 +00:00
|
|
|
['./modules/template', { baz: 'ping' }]
|
2017-11-19 14:35:11 +00:00
|
|
|
],
|
2018-01-13 05:22:11 +00:00
|
|
|
serverMiddleware: ['./modules/middleware/midd2'],
|
2017-11-19 14:35:11 +00:00
|
|
|
hooks(hook) {
|
2018-08-06 00:12:44 +00:00
|
|
|
hook('ready', (nuxt) => {
|
2017-11-19 14:35:11 +00:00
|
|
|
nuxt.__ready_called__ = true
|
|
|
|
})
|
2018-08-06 00:12:44 +00:00
|
|
|
hook('build:done', (builder) => {
|
2017-11-19 14:35:11 +00:00
|
|
|
builder.__build_done__ = true
|
|
|
|
})
|
2017-12-07 08:09:49 +00:00
|
|
|
// Add hook for renderer
|
2018-08-06 00:12:44 +00:00
|
|
|
hook('render:before', (renderer) => {
|
2017-12-07 08:09:49 +00:00
|
|
|
renderer.useMiddleware({
|
|
|
|
path: '/use-middleware',
|
|
|
|
handler: '~/modules/middleware/use-middleware'
|
|
|
|
})
|
|
|
|
})
|
2017-11-19 14:35:11 +00:00
|
|
|
}
|
2017-05-14 22:33:31 +00:00
|
|
|
}
|