Currently there is no clear guidelines on implementing polyfils for browsers. There exists examples to polyfill with core-js although there also exists examples to use .babelrc with the env preset to support older browsers.
There is allot of confusion and issues around this topic.
A clear section in the documentation that describes using .babelrc and the env preset to polyfill older browsers.
We (ethical-jobs) would be happy to write up a PR / example to address this issue if people think its needed.
So to explain:
Next.js supports ie11 and all modern browsers out of the box without polyfills.
The only time you'd need a polyfill is when you are pulling in an external dependency which is using methods that should be polyfilled in ie11/etc, this is what the with-polyfill example shows. So basically we'd have to document that specific part. I'd be super happy to take in a PR with documentation around this if you're willing to write it up 馃檹
Sure I will try and get one fo the team to do this some time next week.
PR is up at https://github.com/zeit/next.js/pull/4601
btw. this is false claim this is fixed: https://github.com/zeit/next.js/issues/5783
Polyfills on native objects like [].includes() are not handled by current setup
I'm not sure what's false here, my comment says exactly what your issue describes.
The only time you'd need a polyfill is when you are pulling in an external dependency which is using methods that should be polyfilled in ie11/etc
Next.js by default with no external dependencies works fine in ie11.
@timneutkens My fault, sorry!
@timneutkens - our app is crashing in IE because of this line in nextjs router: https://github.com/zeit/next.js/commit/b88addfcd5d3d305664ff95a709b4a4df7e0cbcf#diff-49f9285928f23ee1231af5aa2534c70aL66
looks like includes is not polyfilled by default
Most helpful comment
btw. this is false claim this is fixed: https://github.com/zeit/next.js/issues/5783
Polyfills on native objects like
[].includes()are not handled by current setup