mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Fix some DevTools regression test actions and assertions (#34459)
This commit is contained in:
committed by
GitHub
parent
47664deb8e
commit
3fa927b674
@@ -80,7 +80,19 @@ module.exports = {
|
||||
|
||||
// This is only for React DevTools tests with React 16.x
|
||||
// `react/jsx-dev-runtime` and `react/jsx-runtime` are included in the package starting from v17
|
||||
if (semver.gte(ReactVersionTestingAgainst, '17.0.0')) {
|
||||
// Technically 16.14 and 15.7 have the new runtime but we're not testing those versions.
|
||||
if (
|
||||
semver.gte(ReactVersionTestingAgainst, '15.0.0') &&
|
||||
semver.lt(ReactVersionTestingAgainst, '17.0.0')
|
||||
) {
|
||||
plugins.push(
|
||||
[
|
||||
require.resolve('@babel/plugin-transform-react-jsx'),
|
||||
{runtime: 'classic'},
|
||||
],
|
||||
require.resolve('@babel/plugin-transform-react-jsx-source')
|
||||
);
|
||||
} else {
|
||||
plugins.push([
|
||||
process.env.NODE_ENV === 'development'
|
||||
? require.resolve('@babel/plugin-transform-react-jsx-development')
|
||||
@@ -89,11 +101,6 @@ module.exports = {
|
||||
// would be React.createElement.
|
||||
{runtime: 'automatic'},
|
||||
]);
|
||||
} else {
|
||||
plugins.push(
|
||||
require.resolve('@babel/plugin-transform-react-jsx'),
|
||||
require.resolve('@babel/plugin-transform-react-jsx-source')
|
||||
);
|
||||
}
|
||||
|
||||
plugins.push(pathToTransformLazyJSXImport);
|
||||
|
||||
Reference in New Issue
Block a user