-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Optimize Next.js polyfilling behavior (Babel) #8303
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
Comments
Is it also possible to improve the polyfill behaviour for all project dependencies? Gatsby already do this gatsbyjs/gatsby#14111 for production. |
Related: #8521 |
@timneutkens not sure if it is really fixed. Your post only refers to specific libs.
This issue was about polyfill the project based on the environment requirements. Is it done? |
This issue was solved over multiple versions. Transform-runtime was replaced with an alternative for |
Great, thanks! |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Next.js appears to polyfill runtime behavior using
transform-runtime
rather thanpreset-env
.This typically creates more bundle code than the
useBuiltIns
alternative, so we should look at using{ helpers: true, useBuiltIns: true }
or the most optimized configuration we can find.It'd also probably be a great time to create a separate polyfills chunk since they seldom change.
The text was updated successfully, but these errors were encountered: