diff --git a/lib/app/index.js b/lib/app/index.js index bfcecfd48c..1a2d79fed8 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -126,6 +126,10 @@ async function createApp (ssrContext) { key = '$' + key // Add into app app[key] = value + <% if (store) { %> + // Add into store + store[key] = app[key] + <% } %> // Check if plugin not already installed const installKey = '__nuxt_' + key + '_installed__' if (Vue[installKey]) return @@ -140,10 +144,6 @@ async function createApp (ssrContext) { }) } }) - <% if (store) { %> - // Add into store - store[key] = app[key] - <% } %> } <% if (store) { %>