Remove @babel/plugin-transform-classes #65540
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
locked
Performance
Anything with regards to Next.js performance.
Runtime
Related to Node.js or Edge Runtime with Next.js.
To Reproduce
next.js/packages/next/src/build/babel/preset.ts
Lines 159 to 162 in 5ff2731
Current vs. Expected behavior
Include @babel/plugin-transform-classes vs. Removed
Provide environment information
Which area(s) are affected? (Select all that apply)
Performance, Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)
Additional context
I saw it in https://pagespeed.web.dev/analysis?url=https%3A%2F%2Fdeploy-preview-42140--material-ui.netlify.app%2F
Lighthouse warns about the use of legacy transformations, from https://github.com/GoogleChrome/lighthouse/blob/369979f498bd6560127e10476edffb264d4fa3b9/core/audits/byte-efficiency/legacy-javascript.js#L301.
By the look of today's browser support for ES6 Class https://caniuse.com/es6-class, it seems like we should be able to remove this from the default Babel plugin configuration and leave it to be added opt-in by developers. At least, if not for the next major release, in the next few months.
The text was updated successfully, but these errors were encountered: