Closed lcultx closed 7 years ago
if config webpack like this:
//https://webpack.github.io/docs/configuration.html#externals "externals": [ /^react\/lib\/.+/, // any require that refers to internal react modules /^react-dom\/lib\/.+/, // any require that refers to internal react modules { "react": "React", "react-dom": "ReactDOM", "three": "THREE" } ]
it can't find some react inter component in runtime ,such as:
react-dom/lib/ReactCompositeComponent
but if i config webpack like this:
//https://webpack.github.io/docs/configuration.html#externals "externals": [ // /^react\/lib\/.+/, // any require that refers to internal react modules // /^react-dom\/lib\/.+/, // any require that refers to internal react modules { "react": "React", "react-dom": "ReactDOM", "three": "THREE" } ]
i will get a error
react-three-commonjs.js:1141 Uncaught TypeError: Cannot read property 'getPooled' of null
var transaction = _ReactUpdates2.default.ReactReconcileTransaction.getPooled();
because ReactReconcileTransaction is Inject from react-dom but this ReactUpdates is a different
I'm not sure I understand. Why are you rewriting the named used by require? Are you trying to use a version of React from a CDN?
require
React
if config webpack like this:
it can't find some react inter component in runtime ,such as:
react-dom/lib/ReactCompositeComponent
but if i config webpack like this:
i will get a error
because ReactReconcileTransaction is Inject from react-dom but this ReactUpdates is a different