From 68527e8b15d03c5d5eb4e49b4272ea47e7cbe1a3 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Fri, 2 Jun 2017 15:30:56 -0400 Subject: [PATCH] Polyfill require("module") more usefully. --- map.json | 2 +- wrappers/module.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 wrappers/module.js diff --git a/map.json b/map.json index 438c0d81d1..96c88caab8 100644 --- a/map.json +++ b/map.json @@ -13,7 +13,7 @@ "fs": null, "http": "http-browserify", "https": "https-browserify", - "module": null, + "module": "../wrappers/module.js", "net": null, "os": "os-browserify/browser.js", "path": "path-browserify", diff --git a/wrappers/module.js b/wrappers/module.js new file mode 100644 index 0000000000..1225a93b80 --- /dev/null +++ b/wrappers/module.js @@ -0,0 +1 @@ +module.exports = module.constructor;