Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix JS crash "ReferenceError: babelHelpers is not defined"
abortcontroller-polyfill is using rollup + babel to transpile modern JS into ES5 checked into dist/, so that other projects can import these directly regardless whether these projects are using babel themselves or not. This crash was happening when Babel was used in a project that in turn was using abortcontroller-polyfill, and when the abortcontroller-polyfill dependency was overridden using "npm link". Because "npm link" creates a symlink to the folder of the abortcontroller-polyfill git checkout, the entire folder is exposed and not just files that "npm install" would have installed. And in this case, the external-helpers declaration in the abortcontroller-polyfill .babelrc would be picked up by babel running in the parent project causing the "missing babelHelpers" JS crash. The "files" key in package.json was originally added to workaround the equivalent problem when "npm install" rather than "npm link" was used. "External Helpers" are generic Babel helper functions that you can choose to not emit in the beginning of every file if you prefer to provide them via other means, more here: https://babeljs.io/docs/plugins/external-helpers/ This github issue was has info on a similar issue: storybookjs/storybook#1320 (comment)
- Loading branch information