How to use webpack with external react?
sherdeadlock opened this issue · comments
I get an exception Uncaught TypeError: Cannot read property 'getPooled' of null
https://github.com/reactjs/react-art/blob/master/src/ReactART.js#L189
These dependencies may be the root cause?
const ReactInstanceMap = require('react/lib/ReactInstanceMap');
const ReactMultiChild = require('react/lib/ReactMultiChild');
const ReactUpdates = require('react/lib/ReactUpdates');
webpack config
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
},
html
<script src="https://fb.me/react-15.2.0.min.js"></script>
<script src="https://fb.me/react-dom-15.2.0.min.js"></script>
Unfortunately React ART isn't compatible with the CDN builds of React and React DOM since it reaches into internals. You need to get them from npm, sorry for the hassle.