mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: update vm module warning (#44985)
* chore: update vm module warning * Update lib/renderer/init.ts Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user