Target electron runtime to build the name module with node-pre-gyp. This forces the external openssl library to be linked, instead of Node's one.
This now also runs tests using electron-mocha on Windows again.
The issue was that since version 5.0.0, we use the same native modules for both NodeJS and Electron, which is possible from using NAPI. But when building for Node, Node's internal OpenSSL symbols are used, and these are not available in Electron, causing a crash when running in Electron on Windows.
Target electron runtime to build the name module with node-pre-gyp. This forces the external openssl library to be linked, instead of Node's one.
This now also runs tests using electron-mocha on Windows again.
The issue was that since version 5.0.0, we use the same native modules for both NodeJS and Electron, which is possible from using NAPI. But when building for Node, Node's internal OpenSSL symbols are used, and these are not available in Electron, causing a crash when running in Electron on Windows.
See this for details: https://www.electronjs.org/blog/electron-internals-using-node-as-a-library#shared-library-or-static-library
Fixes #67.