-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
ERROR in ../../../../../../../../node_modules/.pnpm/[email protected]/node_modules/jsonrpc-bidirectional/src/Plugins/Client/ElectronIPCTransport.js 6:12-31
Module not found: Error: Can't resolve 'electron' in '/xxx/node_modules/.pnpm/[email protected]/node_modules/jsonrpc-bidirectional/src/Plugins/Client'
@ ../../../../../../../../node_modules/.pnpm/[email protected]/node_modules/jsonrpc-bidirectional/src/Plugins/Client/index.js 12:34-67
@ ../../../../../../../../node_modules/.pnpm/[email protected]/node_modules/jsonrpc-bidirectional/index.js 23:10-41
index.js seems to export everything preventing tree-shaking. Would be nice to have ESM support.
I'm not sure if webpack is parsing this if statement to prevent the require...
[email protected]/node_modules/jsonrpc-bidirectional/src/BidirectionalElectronIPC.js
let electron = null;
if(process && process.versions["electron"])
{
/* eslint-disable*/
electron = require("electron");
// Browser environment
if(!electron && (window || self) && typeof (window || self).require === "function")
{
electron = (window || self).require("electron");
}
/* eslint-enable*/
}I had to add resolve.alias.electron = false to webpack 5 config.
Metadata
Metadata
Assignees
Labels
No labels