You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React 16 requires Set.
I'm developing for an older browser which does not have Set. In production mode, the project works. In dev mode, I get an Set is undefined error.
I'm importing babel-polyfill at the top of my index.js, but that doesn't work.
I tried importing core-js/es6/set directly and didn't work either.
How can I make sure the dev build includes support for legacy browsers?
Also, maybe you should include Set by default in the polyfills as this is required by React 16?
We don't intend to include a Map, Set, or requestAnimationFrame polyfills with CRA.
You are welcome to add them yourself if you target browsers that require them.
Activity
tharakawj commentedon Oct 14, 2017
Already there is pending PR for this. #3200
Ismael commentedon Oct 14, 2017
But I did add those two polyfills and dev didn't work, only prod. Is there any reason for the polyfills not loading on dev?
gaearon commentedon Nov 3, 2017
We don't intend to include a
Map,Set, orrequestAnimationFramepolyfills with CRA.You are welcome to add them yourself if you target browsers that require them.
pridemusvaire commentedon Apr 9, 2018
@Ismael include babel-poly-fill in public/index.html as a script tag, that will solve most of your problems.