Skip to content

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 authored and Andarist committed Dec 17, 2019
1 parent 45ed84f commit 5583d0f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion packages/rollup-plugin-babel/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 packages/rollup-plugin-babel/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 5583d0f

Please sign in to comment.