Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Avoid babel polyfill collision when loaded multiple times by differen… #164

Merged
merged 1 commit into from
Jun 2, 2019

Conversation

apwidejulien
Copy link
Contributor

Babel-polyfill is embedded in the published version of timeline-plus, which cause trouble when integrating with other libraries using this polyfill too.

In fact, I'm a bit surprised of the issue, because it looks that babel polyfill is added as devDependencies in your project (strange regarding documentation which specify that it should be added as a dependency https://babeljs.io/docs/en/babel-polyfill) but despite this, the polyfill is still part of the published version.

The issue with babel-polyfill (I think it depends on the version of babel), is that if you add it twice, it will raise an error instead of just a warning. A trick has been added to babel (babel/babel#6371) for muting the double import (which is probably a better approach when using polyfill in a library).

@yotamberk yotamberk merged commit 05a43a0 into yotamberk:master Jun 2, 2019
@yotamberk
Copy link
Owner

yotamberk commented Jun 2, 2019

Thanks for the correction and PR. I will look at the docs and see why this happened in the first place

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants