From 8cda95c4372b417738b09288cb81ebec9b886917 Mon Sep 17 00:00:00 2001 From: Oskar Nyberg Date: Thu, 16 Apr 2020 02:16:46 +0200 Subject: [PATCH] Prevent electron-builder from adding native modules to asar on macOS (#4169) Having native node modules packaged into the asar archive results in them being unpacked and executed by electron when required by the app. When macOS executes the unpacked native modules, it first sends requests to Apple, and when the response is received or when the request times out the module is loaded. --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index c9719b31eca7..e2dc9a1d6bd5 100644 --- a/package.json +++ b/package.json @@ -264,6 +264,9 @@ "hardenedRuntime": true, "entitlements": "./build/entitlements.mac.plist", "icon": "build/icons/mac/icon.icns", + "asarUnpack": [ + "**/*.node" + ], "publish": [ { "provider": "generic",