Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 3b3452a

Browse files
committed
Added Devtools in production
1 parent c20ca98 commit 3b3452a

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

.electron-vue/webpack.renderer.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ if (process.env.NODE_ENV !== 'production') {
163163
* Adjust rendererConfig for production settings
164164
*/
165165
if (process.env.NODE_ENV === 'production') {
166-
rendererConfig.devtool = ''
167-
168166
rendererConfig.plugins.push(
169167
// new BabiliWebpackPlugin(),
170168
new CopyWebpackPlugin([{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "discord-4sucres-connector",
3-
"version": "0.0.1",
3+
"version": "0.0.3",
44
"author": "Simon MGK <[email protected]>",
55
"description": "Send your Discord guilds emojis on 4sucres",
66
"license": null,

src/renderer/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ import Vue from 'vue'
22
import axios from 'axios'
33
import App from './App'
44
import {version} from '../../package.json';
5+
import { remote } from 'electron'
6+
7+
remote.globalShortcut.register('CommandOrControl+Shift+I', () => {
8+
remote.BrowserWindow.getFocusedWindow().webContents.openDevTools()
9+
})
10+
11+
window.addEventListener('beforeunload', () => {
12+
remote.globalShortcut.unregisterAll()
13+
})
514

615
if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
716
Vue.http = Vue.prototype.$http = axios

0 commit comments

Comments
 (0)