[eprh] Don't transpile to es5 (#32669)

Now that we've moved the sync location of the plugin, we no longer need
this since those restrictions no longer apply.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32669).
* __->__ #32669
* #32668
This commit is contained in:
lauren 2025-03-19 11:49:42 -04:00 committed by GitHub
parent 646835fb59
commit db7dfe0550
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,6 @@ const {asyncRimRaf} = require('./utils');
const codeFrame = require('@babel/code-frame').default;
const Wrappers = require('./wrappers');
const commonjs = require('@rollup/plugin-commonjs');
const {getBabelOutputPlugin} = require('@rollup/plugin-babel');
const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
@ -418,12 +417,6 @@ function getPlugins(
bundle
)
),
// For Meta internal requirements this package needs to be built targeting ES5.
bundle.name === 'eslint-plugin-react-hooks'
? getBabelOutputPlugin({
presets: ['@babel/preset-env'],
})
: false,
// Remove 'use strict' from individual source files. We skip eslint-plugin-react-hooks because
// it bundles compiler-type code that may examine "use strict" used outside of a directive
// context, e.g. as a StringLiteral.
@ -503,7 +496,7 @@ function getPlugins(
// takes care of it.
renaming: false,
}),
(needsMinifiedByClosure || bundle.name === 'eslint-plugin-react-hooks') &&
needsMinifiedByClosure &&
// Add the whitespace back
prettier({
parser: 'flow',