Skip to content

Commit db7dfe0

Browse files
authored
[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
1 parent 646835f commit db7dfe0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

scripts/rollup/build.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const {asyncRimRaf} = require('./utils');
2626
const codeFrame = require('@babel/code-frame').default;
2727
const Wrappers = require('./wrappers');
2828
const commonjs = require('@rollup/plugin-commonjs');
29-
const {getBabelOutputPlugin} = require('@rollup/plugin-babel');
3029

3130
const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
3231

@@ -418,12 +417,6 @@ function getPlugins(
418417
bundle
419418
)
420419
),
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,
427420
// Remove 'use strict' from individual source files. We skip eslint-plugin-react-hooks because
428421
// it bundles compiler-type code that may examine "use strict" used outside of a directive
429422
// context, e.g. as a StringLiteral.
@@ -503,7 +496,7 @@ function getPlugins(
503496
// takes care of it.
504497
renaming: false,
505498
}),
506-
(needsMinifiedByClosure || bundle.name === 'eslint-plugin-react-hooks') &&
499+
needsMinifiedByClosure &&
507500
// Add the whitespace back
508501
prettier({
509502
parser: 'flow',

0 commit comments

Comments
 (0)