You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like I have a Test.js file,
could i change it like this:
constpath=require("path");const{ Hook }=require("require-in-the-middle");// Hook into the Test modulenewHook(["./Test.js"],function(exports,name,basedir){// 在这里对Test模块进行修改或扩展console.log("Hooked into Test module:",name);// 返回你想要的修改后的exports对象returnexports;});constTest=require("./Test.js");console.log(`Test`,Test);
The text was updated successfully, but these errors were encountered:
constHook=require("require-in-the-middle");// Hook into the Test moduleconsthook=newHook(["G:\\xxx\\math\\require_hack\\Test.js"],function(exports,name,basedir){// 在这里对Test模块进行修改或扩展console.log("Hooked into module:",name);// 返回你想要的修改后的exports对象returnexports;});constTest=require("./Test");
but it doesnt work when using null or ['./Test.js']
Like I have a Test.js file,
could i change it like this:
The text was updated successfully, but these errors were encountered: