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.

How to include polyfill?

See original GitHub issue

I’m trying to use Symbol and the babel page says I need to include the polyfill

What is the best approach to include the polyfill in an ember cli project?

Issue Analytics

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

github_iconTop GitHub Comments

33reactions
BrianSipplecommented, May 11, 2017

I’ve noticed that this is the first thing shown by Google when you search “ember babel polyfill”.

For any of those folks looking for an answer, please set the includePolyfill property of the ember-cli-babel hash in your ember-cli-build.js file to true:

var app = new EmberApp({
  'ember-cli-babel': {
    includePolyfill: true
  }
});

Edited after the heads-up from @iNaD.

22reactions
iNaDcommented, May 11, 2017

For further reference if someone will find this Issue. With BrianSipple’s solution you will get a deprecation warning with current versions DEPRECATION: Putting the "includePolyfill" option in "babel" is deprecated, please put it in "ember-cli-babel" instead.

So the correct solution for newer versions is:

var app = new EmberApp({
  'ember-cli-babel': {
    includePolyfill: true
  }
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

When and How to Use Polyfills - Bits and Pieces - Bit.dev
The polyfill uses non-standard features in a certain browser to give JavaScript a standards-complaint way to access the feature. Although this ...
Read more >
How to use polyfill in JavaScript ? - GeeksforGeeks
Create an index.html file and add a heading with <h1> tag. The features of polyfill in the <li> tag and the description about...
Read more >
How To Create A Polyfill - JavaScript in Plain English
A polyfill is a piece of code that implements the features that you expect the browser to support natively. Now that you know...
Read more >
Polyfills and transpilers - The Modern JavaScript Tutorial
A script that updates/adds new functions is called “polyfill”. It “fills in” the gap and adds missing implementations. For this particular case, ...
Read more >
How to use polyfills in your React app - LogRocket Blog
A polyfill allows you to use features that are not supported by a browser (or a specific browser version) by adding a fallback...
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