Fork me on GitHub

Hi! I'm trying to set up shadow-cljs to use a REPL with iced-vim. I had to add settings to my shadow-cljs.edn file and it worked. Then I thought about moving that settings to .nrepl.edn or ~/.nrepl/nrepl.edn. But it's not picking up the changes. I feel like I'm missing something here. I'm using :react-native as target.


For now I'll leave the :nrepl part of the settings on shadow-cljs.edn and move the :dependencies to deps.edn . But if somebody thinks otherwise do let me know!


I don't know what dependencies have to do with nrepl but .nrepl.edn should be picked up


just need to make sure you restart shadow-cljs after making changes

👍 4

Hi, with latest changes to clojurescript ( npm integration becomes better and better. thus there is a question - what is the difference in handling npm dependencies between shadow-cljs and clojurescript? is shadow-cljs mostly just a code reloader via websocket (and sane compiler settings)? why would I prefer shadow-cljs over clojurescript (and vice verse)? sorry if i am asking stupid things, just trying to understand how things are connected thanks!

Vishal Gautam12:05:34

code reloading, build your files based on target (e.g browser, node etc), code splitting, npm integration, sane project configuration settings

Chris McCormick06:05:22

great summary thanks for this. 👍


code-reloading is maybe 5% of what shadow-cljs does so you get a lot more than that 😛


I did a release build and it's heavy. Although not too much, but out of curiosity, is there a way to look into these visually and see what is being included?


very nice, thanks


no probs. it’s a little out of date but I just tested it on my app and it works. there’s no longer a release-snapshot fn in shadow. the build-report fn will generate the snapshot data


and you’ll need > 1 snapshot to see the toggles on the left hand side. just rename the “latest” one and re-gen (or copy “latest” with another name).


sorry about the extra steps. I haven’t looked at it in a while. but now I’m learning about my new apps bundle 🙂


I wish I could remember what I see

Vishal Gautam17:05:27

how do i specify nrepl port for each target build. I tried looking at the docs but couldnt anything


i think only one nprel port?


its just a single nrepl port. but you connect and call (shadow/nrepl-select :app) and that's how you specify which build for each repl


yeah, there should only be one nREPL port. you can connect multiple times and have multiple REPLs


Any problems with using :^const for constants that will not change in a live-reload context, so that they can be used with case, like (case x my-const ...)?


@isak ^:const had issues in a couple releases. should be fixed in 2.9.8. also don't use ^:const 😛


@thheller ok, cool. What is the problem with it? The benefit is the (case) thing


case is exactly the problem. it works differently in clojure.


Ah, ok, sounds like a good reason to avoid, thanks

Brandon Olivier23:05:27

I'm trying to introduce a shadow-cljs project at work. Is it possible to get the tree shaking provided by webpack when I use an npm lib? (it's a lib we own, specifically a component lib)

Lucy Wang01:05:57

I wonder why not use google closure compiler's more advanced optimization instead?