Skip to content

Commit

Permalink
Restore NUL convention for helper name (#198)
Browse files Browse the repository at this point in the history
The null character `\0` seems to have first been introduced by d169da1.

Fixes #197
  • Loading branch information
NMinhNguyen authored and Andarist committed Apr 11, 2020
1 parent 485c5c1 commit 8f78951
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/rollup-plugin-babel/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/rollup-plugin-babel/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ export const INLINE = {};
export const RUNTIME = {};
export const EXTERNAL = {};

export const HELPERS = 'rollupPluginBabelHelpers';
// NOTE: DO NOT REMOVE the null character `\0` as it may be used by other plugins
// e.g. https://github.com/rollup/rollup-plugin-node-resolve/blob/313a3e32f432f9eb18cc4c231cc7aac6df317a51/src/index.js#L74
export const HELPERS = '\0rollupPluginBabelHelpers';
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 @@ -5,7 +5,7 @@ var SourceMapConsumer = require( 'source-map' ).SourceMapConsumer;
var babelPlugin = require( '..' );

// from ./src/constants
var HELPERS = 'rollupPluginBabelHelpers';
var HELPERS = '\0rollupPluginBabelHelpers';

require( 'source-map-support' ).install();

Expand Down

0 comments on commit 8f78951

Please sign in to comment.