mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[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:
parent
646835fb59
commit
db7dfe0550
|
|
@ -26,7 +26,6 @@ const {asyncRimRaf} = require('./utils');
|
||||||
const codeFrame = require('@babel/code-frame').default;
|
const codeFrame = require('@babel/code-frame').default;
|
||||||
const Wrappers = require('./wrappers');
|
const Wrappers = require('./wrappers');
|
||||||
const commonjs = require('@rollup/plugin-commonjs');
|
const commonjs = require('@rollup/plugin-commonjs');
|
||||||
const {getBabelOutputPlugin} = require('@rollup/plugin-babel');
|
|
||||||
|
|
||||||
const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
|
const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
|
||||||
|
|
||||||
|
|
@ -418,12 +417,6 @@ function getPlugins(
|
||||||
bundle
|
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
|
// 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
|
// it bundles compiler-type code that may examine "use strict" used outside of a directive
|
||||||
// context, e.g. as a StringLiteral.
|
// context, e.g. as a StringLiteral.
|
||||||
|
|
@ -503,7 +496,7 @@ function getPlugins(
|
||||||
// takes care of it.
|
// takes care of it.
|
||||||
renaming: false,
|
renaming: false,
|
||||||
}),
|
}),
|
||||||
(needsMinifiedByClosure || bundle.name === 'eslint-plugin-react-hooks') &&
|
needsMinifiedByClosure &&
|
||||||
// Add the whitespace back
|
// Add the whitespace back
|
||||||
prettier({
|
prettier({
|
||||||
parser: 'flow',
|
parser: 'flow',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user