Skip to content

Commit

Permalink
chore: update vm module warning (electron#44985)
Browse files Browse the repository at this point in the history
* chore: update vm module warning

* Update lib/renderer/init.ts

Co-authored-by: Keeley Hammond <[email protected]>

---------

Co-authored-by: Keeley Hammond <[email protected]>
  • Loading branch information
samuelmaddock and VerteDinde authored Dec 11, 2024
1 parent 2191e9b commit 6961e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/renderer/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Module = require('module') as NodeJS.ModuleInternal;
const originalModuleLoad = Module._load;
Module._load = function (request: string) {
if (request === 'vm') {
console.warn('The vm module of Node.js is deprecated in the renderer process and will be removed.');
console.warn('The vm module of Node.js is unsupported in Electron\'s renderer process due to incompatibilities with the Blink rendering engine. Crashes are likely and avoiding the module is highly recommended. This module may be removed in a future release.');
}
return originalModuleLoad.apply(this, arguments as any);
};
Expand Down

0 comments on commit 6961e94

Please sign in to comment.