vuex-electron
vuex-electron copied to clipboard
only Main process tries to set state
My testing (on Windows only) has found frequent file errors caused by one or more renderers trying to write the store state to disk at the same time as the main process.
The if statement I have added prevents processes of type renderer
from duplicating the work of the main process.
Fixes #27
Short question, why do you check for: process.env.NODE_ENV === "test" ? Will this be false, once I deploy my electron app?
Short question, why do you check for: process.env.NODE_ENV === "test" ? Will this be false, once I deploy my electron app?
This is to allow the tests to run, as they do not create an Electron browser (main) process.
Thanks, good to know.
https://github.com/vue-electron/vuex-electron/issues/44