ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Clarifying polyfill setup #509

Closed oyeanuj closed 6 years ago

oyeanuj commented 6 years ago

Hi folks! Quick question - it seems like we use polyfill.io on one hand and also have babel-polyfill package on the other hand? I'd love to understand the how's and why's!

Also, would happy to PR to the docs if we so feel the need!

Thank you!

strues commented 6 years ago

Looks like babel-polyfill is included in the dev deps, but isnt actually used anywhere.

sergiokopplin commented 6 years ago

I'm also having this doubt

oyeanuj commented 6 years ago

@sergiokopplin @strues So safe to take it out?

sergiokopplin commented 6 years ago

Not sure. I'm having a doubt about the use of both

ctrlplusb commented 6 years ago

I think it is used by Jest... but worthwhile checking :)

strues commented 6 years ago

Quick check shows babel-polyfill is only used by babel-cli, which installs the polyfill automatically and behind the scenes.

info Has been hoisted to "babel-polyfill"
info Reasons this module exists
   - "babel-cli" depends on it
   - Specified in "devDependencies"

It's save to remove from the devDeps IMO.

edit: My latest PR removes this from the next branch.

oyeanuj commented 6 years ago

Closing this issue since the PR is in next.