decomponentify icon indicating copy to clipboard operation
decomponentify copied to clipboard

Problem with component defined inside closure

Open rdsubhas opened this issue 11 years ago • 0 comments

Hi, I'm trying deomponentify with move.js. Problem is, the entire component and the require function is defined inside a closure:

(function() {
    function require(...)
    ...
}) ();

When this gets decomponentified, it becomes like this:

(function() {
    function _require(...)
...
}) ();
module.exports = _require;

The problem is, _require is not available outside the closure, and module.exports ends up being undefined.

rdsubhas avatar Apr 18 '14 08:04 rdsubhas