From a67be5be4a97cacb9945703138f07ef46d5200db Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Fri, 29 Apr 2022 22:22:50 +0900 Subject: [PATCH] Enable vue3 devtools --- src/main/index.dev.ts | 11 +++++------ src/renderer/App.vue | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/index.dev.ts b/src/main/index.dev.ts index 3e0d769c..22854cd2 100644 --- a/src/main/index.dev.ts +++ b/src/main/index.dev.ts @@ -7,17 +7,16 @@ /* eslint-disable */ +import installExtension, { VUEJS3_DEVTOOLS } from 'electron-devtools-installer' + // Install `electron-debug` with `devtron` require('electron-debug')({ showDevTools: true }) // Install `vue-devtools` require('electron').app.on('ready', () => { - let installExtension = require('electron-devtools-installer') - installExtension.default(installExtension.VUEJS_DEVTOOLS) - .then(() => {}) - .catch(err => { - console.log('Unable to install `vue-devtools`: \n', err) - }) + installExtension(VUEJS3_DEVTOOLS) + .then(name => console.log(`Added Extension: ${name}`)) + .catch(err => console.log('Unable to install `vue-devtools`: \n', err)) }) // Require `main` process to boot app diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 371111b3..7ac6021c 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -32,7 +32,7 @@ export default { }) }, created() { - this.$store.dispatch('App/watchShortcutsEvents') + this.$store.dispatch('App/watchShortcutEvents') this.$store.dispatch('App/loadPreferences').then(conf => { this.$i18n.locale = conf.language.language })