Skip to content

Commit

Permalink
Inline requires to work around Brunch bug
Browse files Browse the repository at this point in the history
See #8556 and brunch/brunch#1591 (comment) for context.
This appears to be a Brunch bug but we can keep a temporary fix until the next major.
  • Loading branch information
gaearon committed Jan 5, 2017
1 parent b173203 commit 2f7b164
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/addons/ReactAddonsDOMDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ exports.getReactDOM = function() {
};

if (__DEV__) {
var ReactPerf = require('ReactPerf');
var ReactTestUtils = require('ReactTestUtils');
var ReactPerf;
var ReactTestUtils;

exports.getReactPerf = function() {
if (!ReactPerf) {
ReactPerf = require('ReactPerf');
}
return ReactPerf;
};

exports.getReactTestUtils = function() {
if (!ReactTestUtils) {
ReactTestUtils = require('ReactTestUtils');
}
return ReactTestUtils;
};
}

0 comments on commit 2f7b164

Please sign in to comment.