Question: Configuring ES version that Babel outputs
See original GitHub issueI was wondering how to configure Babel in the non-ejected package.json
to work with older browsers? I’m seeing compatibility issues with CasperJS with a PhantomJS backend and also IE 11. Also I have been looking at the ejected webpack configuration files, is there somewhere within these files I should look to configure the output JavaScript version?
I’m somewhat new to a lot of the JavaScript build tools, so general advice would be helpful. I’d like to be able to use the react-scripts without ejecting as much as possible.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
What is Babel? · Babel
Babel is a JavaScript compiler. Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version...
Read more >How to configure Babel to only output es2017/modern code?
I've just found an answer by reading this code that comes from here. It's simply: 'last 2 Chrome versions', 'last 2 Safari versions', ......
Read more >Configuring Babel 6 - 2ality
babel -core : the core compilation machinery and plugin infrastructure for Babel. You will rarely need to install this package, because other ...
Read more >Setting Up a Babel Project - ECMAScript 6 Tutorial
Although there are other options, Babel has become the de-facto standard to compile ECMAScript 6 applications to a version of ECMAScript that can...
Read more >A short and simple guide to Babel - Flavio Copes
Introduction to Babel; Installing Babel; An example Babel configuration ... if all this ES thing sounds confusing to you, see more about ES...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
One easy way to deal with this, is to polyfill everything if they run an old browser. Add this line inside your
<head>
:Sure, it will be slower for old browsers, but as I said, this is super easy to do and has no impact on modern browsers, since the
nomodule
attribute makes the modern browser to skip that script.This code shouldn’t need Symbols, no. This is object spread (
{...stuff}
), not array spread ([...stuff]
). Please raise an issue with React Bootstrap.To add a Symbol polyfill alone, you can do:
assuming you ran
npm i --save core-js
before.