(LogRocket)
| 27 | * Creates/Sets the Vuex store |
| 28 | */ |
| 29 | export const createStore = (LogRocket) => { |
| 30 | const plugins = config.env === 'production' |
| 31 | ? [createPlugin(LogRocket)] |
| 32 | : []; |
| 33 | if (!store) { |
| 34 | store = createVuexStore({ |
| 35 | modules: buildStores(), |
| 36 | plugins, |
| 37 | }); |
| 38 | } |
| 39 | return store; |
| 40 | }; |
| 41 | |
| 42 | /** |
| 43 | * Builds an initial state for our application store |