From 173d657c23e4e8535aa6d4924f01a29ce7137f7e Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 23 Dec 2023 01:01:31 +0000 Subject: [PATCH] Retain `Module.prototype.require.main` [fix] --- lib/init/module.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/init/module.js b/lib/init/module.js index b3a49e25..fb485ebb 100644 --- a/lib/init/module.js +++ b/lib/init/module.js @@ -35,6 +35,7 @@ module.exports = function patchModule() { catalogIfBuiltInModule(id, exports); return exports; }; + Module.prototype.require.main = requireOriginal.main; }; /**