This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional vuex-electron plugin (#692)
* Sync Vuex store between all processes * Add information about `vuex-electron` to docs
- Loading branch information
1 parent
cf53551
commit b1f069a
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
import Vue from 'vue' | ||
import Vuex from 'vuex' | ||
|
||
{{#isEnabled plugins 'vuex-electron'}} | ||
import { createPersistedState, createSharedMutations } from 'vuex-electron' | ||
|
||
{{/isEnabled}} | ||
import modules from './modules' | ||
|
||
Vue.use(Vuex) | ||
|
||
export default new Vuex.Store({ | ||
modules, | ||
{{#isEnabled plugins 'vuex-electron'}} | ||
plugins: [ | ||
createPersistedState(), | ||
createSharedMutations() | ||
], | ||
{{/isEnabled}} | ||
strict: process.env.NODE_ENV !== 'production' | ||
}) |