Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Clarify polyfill support #39272

Merged
merged 4 commits into from
Aug 3, 2022

Conversation

josh-
Copy link
Contributor

@josh- josh- commented Aug 3, 2022

Currently next.js polyfills a subset of APIs for nomodule browsers (such as IE 11), however it's not immediately clear to developers which APIs are transparently polyfilled.

For example, currently Object.entries is polyfilled and thus is usable in IE 11, but it was decided that Object.fromEntries should not be polyfilled. As a developer, this is a confusing situation until you end up finding the next-polyfill-nomodule list of polyfills that are included.

This PR attempts to improve the Supported Browser Features page by:

  • linking to the list of polyfills
  • clarifying that custom polyfills are required for IE11 (and other old browser) compatibility
  • moving the section on Sever-Side polyfills further down the page so all browser polyfill sections are better grouped together

Documentation / Examples

  • Make sure the linting passes by running pnpm lint
  • The examples guidelines are followed from our contributing doc

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. We might also want to add this from 12.2

We've added experimental support for shipping only modern JavaScript by modifying browsersList. You can opt-into this behavior by setting browsersListForSwc: true and legacyBrowsers: false in the experimental option of next.config.js.

@kodiakhq kodiakhq bot merged commit a189542 into vercel:canary Aug 3, 2022
@josh-
Copy link
Contributor Author

josh- commented Aug 4, 2022

Thanks @leerob! 🎉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants