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