diff --git a/packages/vue-app/template/server.js b/packages/vue-app/template/server.js index a7a13e3638..2875bc6d54 100644 --- a/packages/vue-app/template/server.js +++ b/packages/vue-app/template/server.js @@ -24,6 +24,14 @@ if (!Vue.__nuxt__fetch__mixin__) { } <% } %> +Vue.mixin({ + beforeCreate() { + if(Vue.prototype.<%= globals.nuxt %>) { + this.<%= globals.nuxt %> = Vue.prototype.<%= globals.nuxt %> + } + } +}) + // Component: Vue.component(NuxtLink.name, NuxtLink) <% if (features.componentAliases) { %>Vue.component('NLink', NuxtLink)<% } %>