You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/vue-ssr/README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,6 @@ meteor add akryum:vue-ssr
12
12
13
13
**:warning: All your client-side code should be available on the server (which means they shouldn't be in a `client` folder), and the code and libraries should be able to run on the server.**
14
14
15
-
*:warning: vuex & apollo are not tested yet.*
16
-
17
15
Wrap your Vue root instance in a `createApp` function and export it, alongside with the router instance:
18
16
19
17
```javascript
@@ -61,7 +59,11 @@ VueSSR.createApp = function (context) {
61
59
const { app, router } =CreateApp()
62
60
// Set the url in the router
63
61
router.push(context.url)
64
-
return app
62
+
return {
63
+
app,
64
+
// Inject some arbitrary JS
65
+
js:`console.log('hello')`,
66
+
}
65
67
}
66
68
```
67
69
@@ -84,7 +86,11 @@ VueSSR.createApp = function (context) {
0 commit comments