figwheel 2020-05-14

@bhauman yes, it’s a part of the :plugins vector.

so you will want to set :figwheel {:readline false …} in the project.clj

That’d be fine in my own personal project, but if I do it globally in this project, I’ll break readline functionality for those of my colleagues who use it.

Is it possible to put into a profile that can be +’d at startup?

But it’d have to be merged with the options from the other profile(s).

So something like :no-readline {:figwheel {:readline ^:replace false

that could work you may also need to remove the rebel-readline library in the profile as well

How do I instruct start-figwheel! to merge profiles?

oh it doesn’t

you can supply options to start figwheel

Currently I’m pointing towards my build profile, like (ra/start-figwheel! "my-profile")

Is it an either/or thing? Either I supply the entire build information on my call, or I refer to exactly 1 profile?

You can fetch the config and alter it (figwheel-sidecar.config/fetch-config)

Cool! I’ll try that.

(start-figwheel! (figwheel-sidecar.config/fetch-config) "dev")

@bhauman that worked great for merging the :figwheel options. However, the dependency is mentioned in our project.clj like

:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.19"
                                 :exclusions [org.clojure/clojurescript
                                              org.clojure/core.async]]
                                [com.bhauman/rebel-readline "0.1.4"]
...

And that does not seem to be available from the config.

is it working that way?

without getting rid if rebel-readline

The REPL is running, and the config ends up having the :readline false set in :figwheel for the desired build

but it does not get rid of rebel-readline

so you still have the warning

well that seems like a bug

Maybe it’s just not possible with the way our :profiles is set up?

the readline false option should be respected

Thought you said I might need to remove the dep as well.

yeah if you want it to work right now you do

Just for fun, I’ll try testing it without the dep

Right, I’m not prompted when the dependency is not present. Verified 🙂

Should I file this properly at the lein-figwheel github repo?

no worries I’m going to look at it in a moment

Amazing 😄

Thanks for figwheel, btw, it’s great! I think it’s part of the reason I got so into CLJS to begin with.

👍 1

awesome, BTW the I’ve got the new :bundle target working in lein-figwheel and in figwheel-main

so if you want to try npm integration its pretty sweet now

👌 1