Skip to content

Commit 593c70e

Browse files
committed
Inline requires to work around Brunch bug
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.
1 parent fe8d64e commit 593c70e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/addons/ReactAddonsDOMDependencies.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ exports.getReactDOM = function() {
1818
};
1919

2020
if (__DEV__) {
21-
var ReactPerf = require('ReactPerf');
22-
var ReactTestUtils = require('ReactTestUtils');
21+
var ReactPerf;
22+
var ReactTestUtils;
2323

2424
exports.getReactPerf = function() {
25+
if (!ReactPerf) {
26+
ReactPerf = require('ReactPerf');
27+
}
2528
return ReactPerf;
2629
};
2730

2831
exports.getReactTestUtils = function() {
32+
if (!ReactTestUtils) {
33+
ReactTestUtils = require('ReactTestUtils');
34+
}
2935
return ReactTestUtils;
3036
};
3137
}

0 commit comments

Comments
 (0)