mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
Export window.React so that the react-devtools can find it.
The chrome tools first looks to see if `React` is defined globally, then if it's available via a call to `require()`. See https://github.com/facebook/react-devtools/blob/master/injected/ReactHost.js#L42-L48
This commit is contained in:
parent
28b54af064
commit
191f3c8b3f
@ -7,6 +7,9 @@
|
||||
var React = require('react/addons');
|
||||
var ReactTransitionGroup = React.addons.TransitionGroup;
|
||||
|
||||
// Export React so the devtools can find it
|
||||
(window !== window.top ? window.top : window).React = React;
|
||||
|
||||
// CSS
|
||||
require('../../styles/reset.css');
|
||||
require('../../styles/main.css');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user