[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
lauren committed
Mar 19, 2025 at 11:49 UTC
db7dfe05508392ba3bdf7bc24717fe71f9b84a29
1 file changed
+1
-8
scripts/rollup/build.js
+1
-8
@@ -26,7 +26,6 @@ const {asyncRimRaf} = require('./utils');
26
const codeFrame = require('@babel/code-frame').default;
27
const Wrappers = require('./wrappers');
28
const commonjs = require('@rollup/plugin-commonjs');
29
-const {getBabelOutputPlugin} = require('@rollup/plugin-babel');
29
30
const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
31
@@ -418,12 +417,6 @@ function getPlugins(
417
bundle
418
)
419
),
421
- // For Meta internal requirements this package needs to be built targeting ES5.
422
- bundle.name === 'eslint-plugin-react-hooks'
423
- ? getBabelOutputPlugin({
424
- presets: ['@babel/preset-env'],
425
- })
426
- : false,
420
// Remove 'use strict' from individual source files. We skip eslint-plugin-react-hooks because
421
// it bundles compiler-type code that may examine "use strict" used outside of a directive
422
// context, e.g. as a StringLiteral.
@@ -503,7 +496,7 @@ function getPlugins(
496
// takes care of it.
497
renaming: false,
498
}),
506
- (needsMinifiedByClosure || bundle.name === 'eslint-plugin-react-hooks') &&
499
+ needsMinifiedByClosure &&
500
// Add the whitespace back
501
prettier({
502
parser: 'flow',