Closed anmonteiro closed 7 years ago
Across paredit.js you check for typeof module !== "undefined" && module.require;
typeof module !== "undefined" && module.require;
However, Rollup wraps commonJS modules with:
function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; }
which means module.require won't be available. I recommend checking for module.exports being available.
module.require
module.exports
Happy to submit a PR!
I think we also want to move the module.require calls to simply use require under Node.js so that they can be statically analyzed.
require
Across paredit.js you check for
typeof module !== "undefined" && module.require;
However, Rollup wraps commonJS modules with:
which means
module.require
won't be available. I recommend checking formodule.exports
being available.Happy to submit a PR!