vue-electron / vuex-electron

Integration of Vuex and Electron
MIT License
305 stars 97 forks source link

Can't resolve '@/components/...' when importing router into Vuex module file #37

Open Liupeng8 opened 5 years ago

Liupeng8 commented 5 years ago

Hey guys,I have the same problem with this. https://github.com/SimulatedGREG/electron-vue/issues/758

The documentation is still not clear enough, such as the parameters in the whitelist are too general.

In my application, vuex contains app, user, win 3 modules. In the main I only use win, the other 2 are used in the renderer, how can I set createPersistedState()

`createPersistedState({ whitelist: ["whitelistedMutation", "anotherWhitelistedMutation"],

// or

whitelist: (mutation) => { return true },

// or

blacklist: ["ignoredMutation", "anotherIgnoredMutation"],

// or

blacklist: (mutation) => { return true } })`

Help me answer if you have time, thank you

Liupeng8 commented 5 years ago

@AshfieldFox Can you help me with this question? think you.

AshfieldFox commented 5 years ago

I just reply that issue yet. Here it is and hope it would be effective. https://github.com/SimulatedGREG/electron-vue/issues/758#issuecomment-486619093

Liupeng8 commented 5 years ago

@AshfieldFox Is there a way to load only the stores that need to communicate with each other in the main process? If the main process is loaded into the store and the structure in the rendering process is destroyed, the role of vuex-electron will be greatly reduced.

akodkod commented 5 years ago

https://github.com/vue-electron/vuex-electron/issues/44

yanwenjia commented 4 years ago

Is there a good solution?