From db7dfe05508392ba3bdf7bc24717fe71f9b84a29 Mon Sep 17 00:00:00 2001 From: lauren Date: Wed, 19 Mar 2025 11:49:42 -0400 Subject: [PATCH] [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 --- scripts/rollup/build.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 1c3010d902..5cf0518c41 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -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',