question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Babel-compiled code

See original GitHub issue

Babel-compiled code depends on a big drop-in polyfill bundle.

It would be nice if people could just use polyfill.io instead. But currently polyfill.io does not satisfy all the requirements.

afaict, this is what we would need to do:

  • Add a Symbol polyfill.
  • Update our Array.from() polyfill to support iterables.

I’m basing this on info from Babel’s caveats page and a comment from a Babel committer.

NB. We’d also need to add all the ES6 collection classes (separate issue here) for more complete ES6 support, but these aren’t actually required by Babel’s internal mechanics in the way that Array.from() and Symbol are.

more info

The existing babel polyfil bundle comprises:

Technically the regenerator runtime is not a polyfill. It doesn’t actually make generators work (generators are unpolyfillable due to syntax). It just supports Babel’s compilation output for source code that included generators. I don’t think we should worry too much about this. I think the ideal situation would be: “You don’t need Babel’s polyfill bundle if you’re using polyfill.io, but you do still need to drop in Facebook’s regenerator runtime if you’re using generators.”

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JakeChampioncommented, Aug 12, 2016

Closing this issue since the features requested are now implemented. If you find an application which uses babel and doesn’t work using our polyfills please create a new issue covering the specific case.

0reactions
JakeChampioncommented, Jul 29, 2016

We should take one of our applications which use babel and replace core-js polyfill with polyfill-service and see if it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I distribute an NPM package such that React uses ...
We have the original source stored in the projects src/ folder and use babel to output compiled code into the lib/ folder.
Read more >
Problem: Babel isn't compiling my code how I expected
I just setup my Webpack project but Babel isn't compiling the way it should!
Read more >
Using Docker with NodeJS in development and production
We'll need two directories: one for the raw source code ( src ) and one for the Babel-compiled code ( dist ). mkdir...
Read more >
The State of babel-eslint
We hope this will help to mitigate some of the syncing issues ... to make linting Babel-compiled code with ESLint easier and more...
Read more >
babel-compile - npm
When importing code from a babel-compiled library in your tests, ... This is because the Node 0.12 environment doesn't support source maps natively....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found