react-three-renderer
react-three-renderer copied to clipboard
Usage with Preact?
I'm trying to reduce my incredibly huge bundle size (three = 1MB, react-three-renderer = 600kb, firebase, ..) by using Preact. Unfortunately, this results in a ton of errors:
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react/lib/ReactElement' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 13:20-53
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react/lib/ReactCurrentOwner' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 17:25-63
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react/lib/ReactComponent' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 21:23-58
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react/lib/KeyEscapeUtils' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 25:22-57
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInstanceMap' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 41:24-65
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactReconciler' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 45:23-63
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactUpdates' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 49:20-57
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactUpdateQueue' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 53:24-65
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInjection' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 57:22-61
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactReconcileTransaction' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 61:33-83
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactDefaultBatchingStrategy' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 65:36-89
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/traverseAllChildren' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 69:27-71
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/getHostComponentFromComposite' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 73:37-91
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/shouldUpdateReactComponent' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 77:34-85
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInstrumentation' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 81:28-73
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3Renderer.js
Module not found: Error: Can't resolve 'react/lib/ReactComponentTreeHook' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3Renderer.js 135:29-72
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/utils/propTypeInstanceOf.js
Module not found: Error: Can't resolve 'react/lib/ReactPropTypes' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib/utils'
@ ./~/react-three-renderer/lib/utils/propTypeInstanceOf.js 3:22-57
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/utils/propTypeInstanceOf.js
Module not found: Error: Can't resolve 'react/lib/ReactPropTypeLocationNames' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib/utils'
@ ./~/react-three-renderer/lib/utils/propTypeInstanceOf.js 7:34-81
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/InternalComponent.js
Module not found: Error: Can't resolve 'react/lib/ReactCurrentOwner' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/InternalComponent.js 19:25-63
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/InternalComponent.js
Module not found: Error: Can't resolve 'react/lib/ReactElement' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/InternalComponent.js 23:20-53
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/InternalComponent.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInstrumentation' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/InternalComponent.js 27:28-73
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/InternalComponent.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactReconciler' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/InternalComponent.js 31:23-63
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/InternalComponent.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInstanceMap' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/InternalComponent.js 107:25-66
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3CompositeComponentWrapper.js
Module not found: Error: Can't resolve 'react/lib/ReactElement' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3CompositeComponentWrapper.js 11:20-53
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3CompositeComponentWrapper.js
Module not found: Error: Can't resolve 'react/lib/ReactCurrentOwner' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3CompositeComponentWrapper.js 15:25-63
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
ERROR in ./~/react-three-renderer/lib/React3CompositeComponentWrapper.js
Module not found: Error: Can't resolve 'react-dom/lib/ReactInstanceMap' in '/Volumes/HDD1/GitHub/skedge/node_modules/react-three-renderer/lib'
@ ./~/react-three-renderer/lib/React3CompositeComponentWrapper.js 35:24-65
@ ./~/react-three-renderer/lib/React3Renderer.js
@ ./~/react-three-renderer/lib/React3.js
@ ./src/components/CControlWindow.js
@ ./src/components/index.js
@ ./src/App.js
@ ./src/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index
(AND MANY, MANY MORE..)
Does anybody know how to fix this? Thanks!
React-three-renderer/r3r depends a lot on the internal files of react (at least at this stage until the fiber version is finished :D) therefore it may not work with Preact unless Preact simulates the same functionality and files that's necessary for R3r...
Another way is that we could make r3r independent of the internals but that would just increase the file size again. An example would be to see what files it refers to that are in react core and react dom and place copies of those into the r3r repo.
I'll take a look to see how feasible either option would be.