method missing from compiled code in 2.2.0 #37

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

Projects

None yet

3 participants

@lukekarrys

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.

@jdalton jdalton added the bug label Mar 7, 2016
@megawac megawac added a commit that closed this issue Mar 8, 2016
@megawac megawac Fix parsing of properties and symbols
fixes #37, fixes #38
c5a74fe
@megawac megawac closed this in c5a74fe Mar 8, 2016
@megawac megawac reopened this Mar 8, 2016
@megawac
Collaborator
megawac commented Mar 8, 2016

Broke it in 20ec924

@megawac megawac closed this in a545ba1 Mar 8, 2016
@lukekarrys

Thanks @megawac!

@megawac
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