From 03a36adf42897f6f7564f53d7e04ed8a202860b6 Mon Sep 17 00:00:00 2001 From: Hunlongyu Date: Wed, 27 Nov 2019 14:38:23 +0800 Subject: [PATCH] modify about.js error --- src/background.js | 7 +++---- vue.config.js | 11 +++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 vue.config.js diff --git a/src/background.js b/src/background.js index 7e6436b..1c997c2 100644 --- a/src/background.js +++ b/src/background.js @@ -2,8 +2,7 @@ import { app, protocol, BrowserWindow } from 'electron' import { - createProtocol, - installVueDevtools + createProtocol } from 'vue-cli-plugin-electron-builder/lib' const isDevelopment = process.env.NODE_ENV !== 'production' @@ -17,8 +16,8 @@ protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: tru function createWindow () { // Create the browser window. win = new BrowserWindow({ - width: 800, - height: 600, + width: 1024, + height: 800, webPreferences: { nodeIntegration: true } diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..f724ed0 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,11 @@ +module.exports = { + pluginOptions: { + electronBuilder: { + chainWebpackRendererProcess: config => { + if (process.env.NODE_ENV === 'development') { + config.plugins.delete('prefetch') + } + } + } + } +}