Docs: polyfills and supported browsers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
What is the improvement or update you wish to see?
Next.js supports modern browsers with zero configuration.
The NextJS documentation is very unclear about the browser support and how polyfills work. Reading it without understanding how they are applied makes you believe that there is no configuration needed for the mentioned browser list to be polyfilled and work.
We inject widely used polyfills, including:
The link in above goes to the next-polyfill-nomodule which adds the polyfills by noModule property in the script tag. The attribute is set to indicate that the script should not be executed in browsers that support ES modules
Is there any context that might help us understand?
With the current solution it means that no browser with support for ES modules will use the (nomodule) polyfill file. As an example chrome got support for ES modules in version 61, while it did not get support for Promise.allSettled until version 76, that means that any chrome version above 61 won't get polyfilled.
The documentation is at minimum very misleading and potentially can be considered a bug. It seems like the polyfills that are in the nomodules file were made for IE11.
Does the docs page already exist? Please link to it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supported browsers documentation at https://nextjs.org/docs/architecture/supported-browsers and inspect the linked packages/next-polyfill-nomodule/src/index.js. Verify how the noModule polyfill behavior relates to the browser list and ES module support. Done means the documentation clearly explains which browsers are supported, how polyfills are applied, and what configuration is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100