Fork me on GitHub
#clojurescript
<
2020-07-07
>
mmakgaba09:07:17

hiccup vs helix.core dom what's your take?

adriaan.callaerts09:07:10

Hi all. I'm hitting errors while trying to use npm dependencies in cljs. I've followed these guides as best I can: https://figwheel.org/docs/npm.html and https://clojurescript.org/guides/webpack and as far as I've understood the cljs compiler should be smart enough to understand when dependencies should come from npm modules as opposed to cljsjs packages. However, I'm getting a No such namespace: react, could not locate react.cljs, react.cljc, or JavaScript source providing "react" in file resources/public/js/app/reagent/impl/component.cljs error from reagent. Before you ask: yes, I've adjusted my project.clj file to have [reagent "0.10.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]

souenzzo12:07:12

@adriaan.callaerts checkout #shadow-cljs, it has it own npm integration that works like magic (you will not need webpack or exclusions, it just works) But with this fighweel problem: - There is a channel for that #figwheel-main - Double check if webpack and react are installed: ls node_modules/react - check if running webpack manually it output the bundle file (usually target/main.js or something like)

bhauman15:07:27

@adriaan.callaerts yes come over to #figwheel-main if you are having problems with the bundle setup

bhauman15:07:30

@adriaan.callaerts there is a caching problem if you are switching over from cljsjs to node_modules

bhauman15:07:48

you have to make sure you delete your target directory

bhauman15:07:13

For https://twitter.com/hashtag/figwheel?src=hashtag_click there is a file watching problem on the MacOS Big Sur preview. There is a simple solution to set :hawk-options > :watcher to :polling https://github.com/bhauman/figwheel-main/issues/253