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

method missing from compiled code in 2.2.0 #37

Closed
lukekarrys opened this Issue Mar 6, 2016 · 3 comments

Comments

3 participants
@lukekarrys

lukekarrys commented Mar 6, 2016

I'm seeing and error where the generated code with this plugin is now missing having the method inlined in some cases after updating from 2.1.0 to 2.2.0.

source

import {noop} from 'lodash';
export default (cb) => typeof cb === 'function' ? cb : noop;

compiled

'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _noop2 = require('lodash/utility/noop');

var _noop3 = _interopRequireDefault(_noop2);

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

exports.default = function (cb) {
  return typeof cb === 'function' ? cb : ;
};

I put together a gist with a the complete example including my babelrc and the previously compiled code from 2.1.0.

@megawac

This comment has been minimized.

Show comment
Hide comment
@megawac

megawac Mar 8, 2016

Collaborator

Broke it in 20ec924

Collaborator

megawac commented Mar 8, 2016

Broke it in 20ec924

@lukekarrys

This comment has been minimized.

Show comment
Hide comment
@lukekarrys

lukekarrys commented Mar 8, 2016

Thanks @megawac!

@megawac

This comment has been minimized.

Show comment
Hide comment
@megawac

megawac Mar 8, 2016

Collaborator

Fixed in 2.2.1

Collaborator

megawac commented Mar 8, 2016

Fixed in 2.2.1

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