mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
Add hotReload in context
This commit is contained in:
parent
e967191167
commit
f089bcfff6
@ -270,7 +270,7 @@ function addHotReload ($component, depth) {
|
||||
<%= (loading ? 'this.$loading.finish && this.$loading.finish()' : '') %>
|
||||
router.push(path)
|
||||
}
|
||||
let context = getContext({ route: router.currentRoute<%= (store ? ', store' : '') %>, isClient: true, next: next.bind(this), error: this.error }, app)
|
||||
let context = getContext({ route: router.currentRoute<%= (store ? ', store' : '') %>, isClient: true, hotReload: true, next: next.bind(this), error: this.error }, app)
|
||||
<%= (loading ? 'this.$loading.start && this.$loading.start()' : '') %>
|
||||
callMiddleware.call(this, Components, context)
|
||||
.then(() => {
|
||||
|
@ -64,7 +64,8 @@ export function getContext (context, app) {
|
||||
payload: context.payload,
|
||||
error: context.error,
|
||||
base: '<%= router.base %>',
|
||||
env: <%= JSON.stringify(env) %>
|
||||
env: <%= JSON.stringify(env) %>,
|
||||
hotReload: context.hotReload || false
|
||||
}
|
||||
const next = context.next
|
||||
ctx.params = ctx.route.params || {}
|
||||
|
Loading…
Reference in New Issue
Block a user