Merge pull request #2831 from jasonc08/dev

inject ssrContext into createRouter and createStore
This commit is contained in:
Sébastien Chopin 2018-03-01 17:42:10 +01:00 committed by GitHub
commit 83c1e085a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
<% } %>