Closed ebidel closed 1 year ago
Math polyfills were excluded on purpose as it seemed like something only few applications would use them 🤔
More context: we agreed that we could polyfill these Math function(s), but only when used. More than happy to take a PR!
Makes sense not to add APIs which aren't universally applicable to all next users. We can polyfill on our end.
Happy to submit a PR, but maybe a large question is how do you all think about prioritizing one-off polyfill additions like this?
@Timer Is there any specific help I could give you on this use case? I am more than eager to submit a PR, but currently I don't know, if there is also a way to implement such polyfills, and where to look first for implementing this?
@iDuuck i think that's the place to add the polyfills, just need to import Math polyfills from Corejs https://github.com/zeit/next.js/blob/canary/packages/next-polyfill-nomodule/src/index.js
After they published then need another PR to upgrade @next/polyfill-nomodule
in Next package
I might be wrong.
Thank you, @SarKurd. Next question would be, how they want it to be implemented. At the moment, it would be the easiest, to just set an environment variable and call the import
conditionally in the next-polyfill-nomodule
package. But as I know the Next.js team, I think, they want something to specify in the next.config.js
.
Will have a look at the code.
Sorry i'm not sure. I would just create another file in next-polyfill-nomodule
for math polyfills and in Next package would accept another property in next.config.js but it might complicate things and not necessary. might better to wait for their reply
So, I cannot find any reference in the actual Next.js source code to next-polyfill-nomodule
. Is it even loaded into the code by default? (Link to search).
I quickly wanted to create a PR, since it's not that much of an issue as I understand. But this confused me.
Never been that confused lately. Thanks for clarification! All clear now.
Please verify that your issue can be recreated with next@canary
.
please verify canary
label?We noticed the provided reproduction was using an older version of Next.js, instead of canary
.
The canary version of Next.js ships daily and includes all features and fixes that have not been released to the stable version yet. You can think of canary as a public beta. Some issues may already be fixed in the canary version, so please verify that your issue reproduces by running npm install next@canary
and test it in your project, using your reproduction steps.
If the issue does not reproduce with the canary
version, then it has already been fixed and this issue can be closed.
canary
?The safest way is to install next@canary
in your project and test it, but you can also search through closed Next.js issues for duplicates or check the Next.js releases.
canary
now?Next.js does not backport bug fixes to older versions of Next.js. Instead, we are trying to introduce only a minimal amount of breaking changes between major releases.
An issue with the please verify canary
that receives no meaningful activity (e.g. new comments that acknowledge verification against canary
) will be automatically closed and locked after 30 days.
If your issue has not been resolved in that time and it has been closed/locked, please open a new issue, with the required reproduction, using next@canary
.
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps. Furthermore, you can upvote the issue using the :+1: reaction on the topmost comment (please do not comment "I have the same issue" without repro steps). Then, we can sort issues by votes to prioritize.
We look into every Next.js issue and constantly monitor open issues for new comments.
However, sometimes we might miss one or two due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.
Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.
This issue has been automatically closed because it wasn't verified against next@canary. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Bug report
Describe the bug
Math.trunc
is not available in IE11. Seeing errors show up in bugsnag for this one.Expected behavior
Math.trunc
should be polyfilled in the IE11 polyfill bundle.System information