mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Add require.async().
This commit is contained in:
1 parent
d703813c27
commit
78f8b6771c
1 file changed
+2
@@ -260,6 +260,8 @@ node.Module.prototype.loadScript = function (loadPromise) {
|
||||
return requireAsync(url).wait();
|
||||
}
|
||||
|
||||
require.async = requireAsync;
|
||||
|
||||
// create wrapper function
|
||||
var wrapper = "function (__filename, exports, require) { " + content + "\n};";
|
||||
var compiled_wrapper = node.compile(wrapper, self.filename);
|
||||
|
||||
Reference in new issue
Block a user