Skip to content

Commit

Permalink
Drop @babel/plugin-transform-classes by default (#68290)
Browse files Browse the repository at this point in the history
We shouldn't include this by default in our plugins list anymore and
this should be handled by browserslist instead via `@babel/preset-env`
if browsers old enough that need this are configured. Additionally we'll
leave this configured if specific config is being provided for it to
avoid unexpected dropping.

Closes: #65540
Closes: NEXT-3598
  • Loading branch information
ijjk authored Jul 29, 2024
1 parent 340dfbe commit be3e330
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/next/src/build/babel/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ export default (
},
],
require('./plugins/react-loadable-plugin'),
[
// only enable this plugin if custom config for it was provided
// otherwise we will only enable it if their browserslist triggers
// preset-env to pull it in
options['class-properties'] && [
require('next/dist/compiled/babel/plugin-proposal-class-properties'),
options['class-properties'] || {},
],
Expand Down

0 comments on commit be3e330

Please # to comment.