New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the Source to ES Modules #11389

merged 23 commits into from Nov 2, 2017
Jump to file or symbol
Failed to load files and symbols.
+13 −9
Diff settings


Just for now

Viewing a subset of changes. View all

Convert react-noop-renderer package to ES Modules

  • Loading branch information...
gaearon committed Oct 27, 2017
commit c90daf81d376a65cabff1e07127b16db20c0a3d2
@@ -9,4 +9,8 @@
'use strict';
module.exports = require('./src/ReactNoop');
var ReactNoop = require('./src/ReactNoop');
// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest.
module.exports = ReactNoop.default ? ReactNoop.default : ReactNoop;
@@ -20,12 +20,13 @@ import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {UpdateQueue} from 'react-reconciler/src/ReactFiberUpdateQueue';
// TODO: direct imports like some-package/src/* are bad. Fix me.
var ReactFiberInstrumentation = require('react-reconciler/src/ReactFiberInstrumentation');
var ReactFiberReconciler = require('react-reconciler');
var ReactFeatureFlags = require('shared/ReactFeatureFlags');
var ReactInstanceMap = require('shared/ReactInstanceMap');
var emptyObject = require('fbjs/lib/emptyObject');
var expect = require('expect');
import ReactFiberInstrumentation
from 'react-reconciler/src/ReactFiberInstrumentation';
import ReactFiberReconciler from 'react-reconciler';
import ReactFeatureFlags from 'shared/ReactFeatureFlags';
import ReactInstanceMap from 'shared/ReactInstanceMap';
import emptyObject from 'fbjs/lib/emptyObject';
import expect from 'expect';
const UPDATE_SIGNAL = {};
@@ -558,9 +559,8 @@ var ReactNoop = {
// Private. Used only by fixtures/fiber-debugger.
// (To be fair, it's the only place where `react-noop-renderer` package is used at all.)
module.exports = ReactNoop;
export default ReactNoop;
ProTip! Use n and p to navigate between commits in a pull request.