mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
inject ssrContext into createRouter and createStore
This commit is contained in:
parent
4a5aa48b44
commit
65b8148a3d
@ -44,10 +44,10 @@ const defaultTransition = <%=
|
||||
%>
|
||||
|
||||
async function createApp (ssrContext) {
|
||||
const router = createRouter()
|
||||
const router = createRouter(ssrContext)
|
||||
|
||||
<% if (store) { %>
|
||||
const store = createStore()
|
||||
const store = createStore(ssrContext)
|
||||
// Add this.$router into store actions/mutations
|
||||
store.$router = router
|
||||
<% } %>
|
||||
|
Loading…
Reference in New Issue
Block a user