Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function dropped #411

Closed
klimashkin opened this issue Feb 9, 2017 · 2 comments · Fixed by #414
Closed

Function dropped #411

klimashkin opened this issue Feb 9, 2017 · 2 comments · Fixed by #414
Labels
bug Confirmed bug

Comments

@klimashkin
Copy link

klimashkin commented Feb 9, 2017

Babili 0.0.11

Input:

var s = function () {
  function e(e, t) {
    for (var n = 0; n < t.length; n++) {
      var o = t[n];
    }
  }

  return function (t, n, o) {
    return n && e(t.prototype, n), o && e(t, o), t
  }
}()

Output:

var s=function(){return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();

As you can see there is no a function defined, it was dropped

It affects react-popout which sits in node_modules, if you try to babili whole bundle with webpack plugin

@inDream
Copy link

inDream commented Feb 9, 2017

This bug seems appeared after 39b74de (#390).

@boopathi boopathi added the bug Confirmed bug label Feb 9, 2017
@boopathi
Copy link
Member

boopathi commented Feb 9, 2017

var s = function () {
  function e(e) {}
  return function () {
    return e();
  };
}()

Out:

var s = function () {
  function e(a) {}
  return function () {
    return a();
  };
}();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants