mirror of
https://github.com/facebook/react.git
synced 2026-02-25 05:03:03 +00:00
* Update transforms to handle ES modules
* Update Jest to handle ES modules
* Convert react package to ES modules
* Convert react-art package to ES Modules
* Convert react-call-return package to ES Modules
* Convert react-test-renderer package to ES Modules
* Convert react-cs-renderer package to ES Modules
* Convert react-rt-renderer package to ES Modules
* Convert react-noop-renderer package to ES Modules
* Convert react-dom/server to ES modules
* Convert react-dom/{client,events,test-utils} to ES modules
* Convert react-dom/shared to ES modules
* Convert react-native-renderer to ES modules
* Convert react-reconciler to ES modules
* Convert events to ES modules
* Convert shared to ES modules
* Remove CommonJS support from transforms
* Move ReactDOMFB entry point code into react-dom/src
This is clearer because we can use ES imports in it.
* Fix Rollup shim configuration to work with ESM
* Fix incorrect comment
* Exclude external imports without side effects
* Fix ReactDOM FB build
* Remove TODOs I don’t intend to fix yet
16 lines
611 B
JavaScript
16 lines
611 B
JavaScript
'use strict';
|
|
|
|
// We want to globally mock this but jest doesn't let us do that by default
|
|
// for a file that already exists. So we have to explicitly mock it.
|
|
jest.mock('shared/ReactFeatureFlags', () => {
|
|
const flags = require.requireActual('shared/ReactFeatureFlags').default;
|
|
return Object.assign({}, flags, {
|
|
disableNewFiberFeatures: true,
|
|
});
|
|
});
|
|
|
|
// Error logging varies between Fiber and Stack;
|
|
// Rather than fork dozens of tests, mock the error-logging file by default.
|
|
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
|
jest.mock('react-reconciler/src/ReactFiberErrorLogger');
|