Skip to content

Commit 11e455d

Browse files
kevinmarrecphortx
authored andcommitted
fix: nuxt docs (#100)
* fix: nuxt docs * add missing store index file snippet
1 parent 3479974 commit 11e455d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/guide/nuxt.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@
55
Since Version 1.0.0.RC.21 there is support for SSR. The following example shows how to setup
66
Vuex-ORM and Plugin GraphQL with Nuxt.
77

8-
`/store/index.js`:
8+
`nuxt.config.js`:
99

1010
```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+
```
1318

14-
export default { plugins: [installVuexOrm] };
19+
`/store/index.js`:
20+
21+
```javascript
22+
export const state = () => ({});
1523
```
1624

1725

@@ -21,7 +29,7 @@ export default { plugins: [installVuexOrm] };
2129
import VuexORM from '@vuex-orm/core';
2230
import database from '~/data/database';
2331

24-
export default (store) => {
32+
export default ({ store }) => {
2533
VuexORM.install(database)(store);
2634
};
2735

0 commit comments

Comments
 (0)