You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new cljs :bundle target allows pretty seamless npm and webpack integration for CLJS projects.
I just tried to fix the Rum part of the lein-figwheel template to operate with this new target and it didn't work. This is because Rum is still using :require [cljs.react][cljs.react.dom] while the same cljsjs deps can be required via :require [react][react-dom] which also allows developers to provide react and react-dom via npm instead.
When changing this way of requiring libs one also needs to refer to the ns as the js object. For example one would use react-dom/render instead of js/ReactDOM.
Reagent has already adopted this convention.
There may be a reason that you are doing things this way but if possible it would be pretty cool to allow react to be provided by npm deps.
The text was updated successfully, but these errors were encountered:
The new cljs
:bundle
target allows pretty seamless npm and webpack integration for CLJS projects.I just tried to fix the Rum part of the lein-figwheel template to operate with this new target and it didn't work. This is because Rum is still using
:require [cljs.react][cljs.react.dom]
while the same cljsjs deps can be required via:require [react][react-dom]
which also allows developers to providereact
andreact-dom
via npm instead.When changing this way of requiring libs one also needs to refer to the ns as the js object. For example one would use
react-dom/render
instead ofjs/ReactDOM
.Reagent has already adopted this convention.
There may be a reason that you are doing things this way but if possible it would be pretty cool to allow react to be provided by npm deps.
The text was updated successfully, but these errors were encountered: