Fork me on GitHub
#shadow-cljs
<
2022-07-07
>
john04:07:57

Got the sync xhr working from the webworker! 🎉

john04:07:19

Just a basic (sleep 100) but it's a start

john04:07:43

Now I just gotta sort out routing other worker results through the sw response

thheller05:07:58

@pat561 looks like you are using :js-provider :external. must make sure that the :external-index file is loaded before the CLJS output, it provides the shadow$bridge function

Patrick Brown10:07:23

@U05224H0W BIG LOVE for the help! It wasn’t a shadow problem. It was a webpack thing. I was looking in the wrong place until you straightened me out. So thanks!👍

Patrick Brown11:07:25

Perhaps a bit soon… I still get the websocket connection error. WebSocket connection to ‘<ws://example.com:9630/api/remote-relay?server-token=e0a23750-25c2-4870-900f-12345678>’ failed: shadow$cljs$devtools$client$websocket$start @ websocket.cljs:12 eval @ shared.cljs:324 shadow$cljs$devtools$client$shared$init_runtime_BANG_ @ shared.cljs:509 eval @ browser.cljs:337 goog.globalEval @ live.js:472 env.evalLoad @ live.js:1533 (anonymous) @ live.js:1777 I start getting errors after all data has finished loading. It’s refresh to load at this point. EDIT 1: I had a nice walk and it came to me… I’ve got to allow websocket traffic on 9630. I’m not sure how to do this, but at this point it’s most def not your problem. Cheers! EDIT 2: That was crazy easy! I’m super impressed with how well designed this tool is.

thheller15:07:55

you can also set :devtools-url "" (or whereever shadow-cljs actually runs) if you don't want to proxy 9630 https://shadow-cljs.github.io/docs/UsersGuide.html#proxy-support