From c25df345f442f7539df2cdba608268752ef19cdc Mon Sep 17 00:00:00 2001 From: miyanokomiya Date: Sun, 11 Nov 2018 13:53:15 +0900 Subject: [PATCH 1/2] disabled vuex-electron in build:web --- template/src/renderer/store/index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/template/src/renderer/store/index.js b/template/src/renderer/store/index.js index e7219b31..5a330cb0 100644 --- a/template/src/renderer/store/index.js +++ b/template/src/renderer/store/index.js @@ -1,9 +1,6 @@ import Vue from 'vue' import Vuex from 'vuex' -{{#isEnabled plugins 'vuex-electron'}} -import { createPersistedState, createSharedMutations } from 'vuex-electron' - {{/isEnabled}} import modules from './modules' @@ -12,9 +9,9 @@ Vue.use(Vuex) export default new Vuex.Store({ modules, {{#isEnabled plugins 'vuex-electron'}} - plugins: [ - createPersistedState(), - createSharedMutations() + plugins: process.env.IS_WEB ? [] : [ + require('vuex-electron').createPersistedState(), + require('vuex-electron').createSharedMutations() ], {{/isEnabled}} strict: process.env.NODE_ENV !== 'production' From ed098d9e50987334d9c4f17e1aa2844a2cc038f9 Mon Sep 17 00:00:00 2001 From: miyanokomiya Date: Sun, 11 Nov 2018 16:29:19 +0900 Subject: [PATCH 2/2] delete invalid line --- template/src/renderer/store/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/template/src/renderer/store/index.js b/template/src/renderer/store/index.js index 5a330cb0..494512a3 100644 --- a/template/src/renderer/store/index.js +++ b/template/src/renderer/store/index.js @@ -1,7 +1,6 @@ import Vue from 'vue' import Vuex from 'vuex' -{{/isEnabled}} import modules from './modules' Vue.use(Vuex)