Fork me on GitHub

Can I use “static image loading” ( also from ClojureScript when using shadow-cljs? That would be including the automatically loading of @2x and @3x variants… Second question: How could I have found the answer to the first question myself? I couldn’t find the answer by web searching and searching in ClojureVerse and Zulip… 😞


Not uncommon for people not to talk about stuff like that - so you’re not doing anything wrong! Asking here or on ClojureVerse (or reddit, or indeed everywhere) is usually a good idea.


(Two negations, sorry!)


Since you’re talking about react native I’d look around for the relevant channels too. It’s a smaller community that does react native with ClojureScript...


Thanks guys! I was told that this community is very supportive, but it still amazes me how much that is true! @thheller That worked. The relative path starting with ‘..’ was the missing part, didn’t occur to me to try it that way.


I’m having some trouble with a bootstrapped web worker. I’ve made a minimal reproducible case. Here it is hosted (check the console). and here is the source The worker is getting a document not defined error. It appears that this is the culprit. If I change this to use js/eval everything works. Do I have some configuration wrong or is this a bug when trying to do bootstrapped web workers?


@jimmy that code assumes it is running in a normal browser context. webworkers should probably have their own version but if it works I'd be fine to change that


should be (js/goog.globalEval ...) though


@thheller The doc string says it is for optimization purposes. I’m happy to make a PR changing it to js/goog.globalEval, but want to make sure it isn’t going to cause any performance regressions. Any benchmarks I need to run as part of the PR?


(js/eval ...) never gets JIT optimized so it runs substantially slower. js/goog.globalEval should be ok

👍 1

please put the file into your classpath first


and actually run it since I have no setup to verify that it actually works as intended in a webworker after that


well I guess I do since you made the repo


Not sure I will get around to it today. But I will definitely make sure things are working in the browser and in the web worker before submitting.


Thanks for the quick help and great project