Fork me on GitHub
#figwheel-main
<
2020-07-23
>
borkdude11:07:16

I don't understand the https://figwheel.org/config-options#connect-url option. I have put :connect-url "" in my figwheel-main.edn but it keeps connecting to localhost:9500 which is not where the figwheel server is running

borkdude11:07:26

hah, now it started working all of a sudden.. after upgrading to 0.2.11, weird

borkdude11:07:18

so now I kinda wish I could set that IP using some environment variable because this IP will be different for every of my colleagues

borkdude11:07:33

where can I configure the JS/CLJS function that should be called after reloading sources?

borkdude11:07:14

Found it here: https://figwheel.org/docs/hot_reloading.html I expected this to be part of the figwheel-main.edn file without having to change my source code.

borkdude13:07:43

I guess figwheel doesn't come with any CSS/less magic other than reloading the CSS right?

bhauman15:07:08

@borkdude yes that’s right

borkdude15:07:01

ok, that's fine. I solved that problem. My only remaining thing is be able to set :connect-url dynamically, based on some env variable for example

borkdude15:07:03

for anyone curious, I'm using this for less:

:less/dev {:extra-deps
                      {deraen/less4clj {:mvn/version "0.7.4"}}
                      :main-opts ["-m" "less4clj.main"
                                  "--auto"
                                  "--source-map"
                                  "--inline-javascript"
                                  "--source-paths" "resources/public/css" "--target-path" "target/public/css"]}

borkdude15:07:53

The docs for :connect-url aren't entirely clear to me. It speaks about "server side" and "client side". but :connect-url is only used from the browser to connect to the websocket server, right? so why all these options for "server side"?

borkdude16:07:42

I think I just need :connect-url "ws://[[client-hostname]]:9500/figwheel-connect" - seems to work for me

bhauman17:07:54

@borkdude cool I’m glad you found something that worked

bhauman17:07:49

@borkdude the server-hostname stuff is helpful if you are listening on a certain eth address and that happens to be address that your client is using

bhauman17:07:33

really glad you are taking the new stuff for a spin

borkdude17:07:04

is this new? I haven't been following for a while 🙂 I'm porting the CLJS and less build from boot to deps.edn

bhauman17:07:23

oh this isn’t new

bhauman17:07:57

I thought you might be trying out the new :target :bundle support for npm deps

bhauman17:07:19

there is also HTTPS support

borkdude17:07:24

I might, but probably not for this project because my team lead is not fond of npm...

borkdude17:07:05

just good old foreign-libs and cljsjs

borkdude17:07:56

it's good to have support for it though. I'm glad all is working now together with our old boot stuff, hybrid

bhauman17:07:50

well that stuff works and works well enough for sure!