New webPreferences settings for node integration
Opened this issue · 0 comments
Marxsal commented
Apparently there have been changes in the recent versions of node, so that webPreferences now needs to be:
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true }
Without this, attempts to use "require" (and probably other bits of the node api) in the browser will fail with message "Uncaught ReferenceError: require is not defined".
(Node 14+)