diff --git a/docs/guide/modules.md b/docs/guide/modules.md index 5630c8f6e..5723b4060 100644 --- a/docs/guide/modules.md +++ b/docs/guide/modules.md @@ -280,6 +280,10 @@ export function createPlugin (options = {}) { You can register a module **after** the store has been created with the `store.registerModule` method: ``` js +import Vuex from 'vuex' + +const store = new Vuex.Store({ /* options */ }) + // register a module `myModule` store.registerModule('myModule', { // ...