Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #31 from ericf/fix-babel-helper-bindings
Browse files Browse the repository at this point in the history
Fix Babel helper binding renaming
  • Loading branch information
Victorystick committed Jan 7, 2016
2 parents f58ec45 + 835245c commit d632c9a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export default function babel ( options ) {

return buildExternalHelpers( helpers, 'var' )
.replace( /var babelHelpers = {};\n/, '' )
.replace( /babelHelpers\.(.+) = function(?: \w+)?/g, 'function babelHelpers_$1' )
.replace( /babelHelpers\.(.+) = /g, 'var babelHelpers_$1 = ' )
.replace( 'babelHelpers;', '' ) // not sure where this comes from...
.trim() + '\n';
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe( 'rollup-plugin-babel', function () {
var generated = bundle.generate();
var code = generated.code;

assert.ok( code.indexOf( 'function babelHelpers_classCallCheck' ) !== -1, generated.code );
assert.ok( code.indexOf( 'babelHelpers_classCallCheck =' ) !== -1, generated.code );
assert.ok( code.indexOf( 'var _createClass =' ) === -1, generated.code );
});
});
Expand Down

0 comments on commit d632c9a

Please sign in to comment.