Vitor Barbosa 2020-03-11T10:54:31.073500Z

@mike858 I found a nice solution:

lein 'trampoline' 'run' '-m' 'figwheel.main' '-co' 'dev.cljs.edn' '-fwo' 'figwheel-main.edn:figwheel-main.developer-config.edn' '-c' '-r'

Vitor Barbosa 2020-03-11T10:55:59.073700Z

Here figwheel-main.developer-config.edn is git ignored and can have configuration variables specific for each dev

Vitor Barbosa 2020-03-11T10:56:57.073900Z

I put this in a makefile so we can just run make run and it will read from figwheel-main.edn and figwheel-main.developer-config.edn and merge the configs from left to right

Vitor Barbosa 2020-03-11T10:58:26.074100Z

Here is the relevant part from figwheel --help

-fwo, --fw-opts edn          Options to configure figwheel.main, can be an EDN 
                              string or system-dependent path-separated list of 
                              EDN files / classpath resources. Options will be 
                              merged left to right.


posting here since it's maybe more relevant, I was asking a question on #clojurescript


so how do people in general deal with the fact that during local dev if you have lots of js libraries it loads the browser needs to load a gazillion files?


shadow-cljs apparently still merges them all into one by default, can I get the same behaviour somehow or at least make sure they are all cached somehow?

pyrmont 2020-03-11T12:27:14.077100Z

Is it a big problem? Even if they're merged, the amount of data is the same. Is the HTTP overhead considerable for local dev?


well I see 2400 different requersts for small JS files in one project


which takes forever every time I load the page


I have to investigate why so much


is not a big project, but anyway at least they should all be cached and just return a 304


in prod is just 25 requests just because of the various. analytics, and it takes infinitively less time to load

pez 2020-03-11T13:21:51.082800Z

I do not have that problem in my half-big project...


do you use the figwheel ring server or your own?

pez 2020-03-11T13:29:31.084300Z

Just figwheel's. Is that why I don't have the problem, you think?




I'll try


mm no it still does lots of requests, but looks like 428 instead of 2400


so it is still better with the figwheel ring server for some reason

pez 2020-03-11T14:30:00.086900Z

Maybe that's what I have. Will check the project tomorrow and see.


yeah well it's still 428 requests that should return 304 instead of 200 tbf

pyrmont 2020-03-11T15:04:57.088400Z


pez 2020-03-11T16:07:13.089100Z

So it is loading the page that is the problem, not hot reload?

pez 2020-03-11T16:09:57.090200Z

b/c I get 388 requests when I load the page. I use server side rendering so it never feels very slow.