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

BindExpression changed behavior between beta.0 and beta.2 #6458

Closed
TrejGun opened this Issue Oct 11, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@TrejGun

TrejGun commented Oct 11, 2017

bug report

transform-decorators-legacy is somehow broken in latest version and doesn't refer imported objects properly

Input Code

import Obj from "./file";

console.log(::Obj.method)

Babel Configuration (.babelrc, package.json, cli command)

{
  "plugins": [
    "transform-function-bind"
  ],
  "presets": ["env"]
}

Expected Behavior

"use strict";

var _file = _interopRequireDefault(require("./file"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

console.log(_file.default.method.bind(_file));

Current Behavior

"use strict";

var _file = _interopRequireDefault(require("./file"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

console.log(_file.default.method.bind(Obj));

Possible Solution

import * as Obj from "./file";

console.log(::Obj.default.method)

Context

Your Environment

software version(s)
Babel 7.0.0-beta.2
node 8.4.0
npm 5.4.0
Operating System mac sierra
@babel-bot

This comment has been minimized.

Show comment
Hide comment
@babel-bot

babel-bot Oct 11, 2017

Collaborator

Hey @TrejGun! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

Collaborator

babel-bot commented Oct 11, 2017

Hey @TrejGun! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@TrejGun

This comment has been minimized.

Show comment
Hide comment
@TrejGun

TrejGun commented Oct 16, 2017

@lock lock bot added the outdated label May 4, 2018

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.