From 037bb1a2ff7423502e6b54b988011476b3d79bae Mon Sep 17 00:00:00 2001 From: Hunlongyu Date: Mon, 19 Oct 2020 13:40:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=90=20=E5=8D=87=E7=BA=A7electron?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=88=B0=E6=9C=80=E6=96=B0=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/background.js | 1 + yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3677275..7a7676f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@vue/eslint-config-standard": "^5.1.2", "babel-eslint": "^10.1.0", "babel-plugin-component": "^1.1.1", - "electron": "^9.3.1", + "electron": "^10.1.3", "electron-devtools-installer": "^3.1.0", "eslint": "^6.7.2", "eslint-plugin-import": "^2.20.2", diff --git a/src/background.js b/src/background.js index c53c170..e1bf182 100644 --- a/src/background.js +++ b/src/background.js @@ -22,6 +22,7 @@ function createWindow () { resizable: true, webPreferences: { webSecurity: false, + enableRemoteModule: true, nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION } }) diff --git a/yarn.lock b/yarn.lock index ddb7516..7524e3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3657,10 +3657,10 @@ electron-to-chromium@^1.3.488: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.496.tgz#3f43d32930481d82ad3663d79658e7c59a58af0b" integrity sha512-TXY4mwoyowwi4Lsrq9vcTUYBThyc1b2hXaTZI13p8/FRhY2CTaq5lK+DVjhYkKiTLsKt569Xes+0J5JsVXFurQ== -electron@^9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-9.3.1.tgz#e301932c5c0537d8c9a8850d216d3ba454dbf55c" - integrity sha512-DScrhqBT4a54KfdF0EoipALpHmdQTn3m7SSCtbpTcEcG+UDUiXad2cOfW6DHeVH7N+CVDKDG12q2PhVJjXkFAA== +electron@^10.1.3: + version "10.1.3" + resolved "https://registry.npm.taobao.org/electron/download/electron-10.1.3.tgz#7e276e373bf30078bd4cb1184850a91268dc0e6c" + integrity sha1-fiduNzvzAHi9TLEYSFCpEmjcDmw= dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12"