Closed algj closed 3 years ago
I wanted to replace require function to accept json files, but I noticed that global.require is undefined, but functions like global.console.log aren't, this is weird.
require
global.require
global.console.log
Same for Module.prototype.require, Module is undefined.
Module.prototype.require
Module
How do I replace require function?
require is currently defined per module.
But if you simply want to require JSON files, let me check what the problem with #114 (require JSON files) is this weekend and report!
I wanted to replace
require
function to accept json files, but I noticed thatglobal.require
is undefined, but functions likeglobal.console.log
aren't, this is weird.Same for
Module.prototype.require
,Module
is undefined.How do I replace
require
function?