From f089bcfff628f7c9b311e2745efa68bcf9a9a1ca Mon Sep 17 00:00:00 2001 From: Sebastien Chopin Date: Wed, 31 May 2017 13:21:24 +0200 Subject: [PATCH] Add hotReload in context --- lib/app/client.js | 2 +- lib/app/utils.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/app/client.js b/lib/app/client.js index 5b92f79b8c..ccb2381d02 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -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(() => { diff --git a/lib/app/utils.js b/lib/app/utils.js index 048d3e9be0..edd88defb2 100644 --- a/lib/app/utils.js +++ b/lib/app/utils.js @@ -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 || {}