File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 5
5
Since Version 1.0.0.RC.21 there is support for SSR. The following example shows how to setup
6
6
Vuex-ORM and Plugin GraphQL with Nuxt.
7
7
8
- ` /store/index .js` :
8
+ ` nuxt.config .js` :
9
9
10
10
``` javascript
11
- import installVuexOrm from ' ~/plugins/vuex-orm' ;
12
- import ' ~/plugins/graphql' ;
11
+ export default {
12
+ plugins: [
13
+ ' ~/plugins/vuex-orm' ,
14
+ ' ~/plugins/graphql'
15
+ ]
16
+ };
17
+ ```
13
18
14
- export default { plugins: [installVuexOrm] };
19
+ ` /store/index.js ` :
20
+
21
+ ``` javascript
22
+ export const state = () => ({});
15
23
```
16
24
17
25
@@ -21,7 +29,7 @@ export default { plugins: [installVuexOrm] };
21
29
import VuexORM from ' @vuex-orm/core' ;
22
30
import database from ' ~/data/database' ;
23
31
24
- export default (store ) => {
32
+ export default ({ store } ) => {
25
33
VuexORM .install (database)(store);
26
34
};
27
35
You can’t perform that action at this time.
0 commit comments