Fork me on GitHub
#shadow-cljs
<
2024-03-22
>
steveb8n00:03:53

An observation and a question about :preloads on nodejs. learning this cost me a few hours so might be worth documenting somewhere. more in thread….

steveb8n00:03:47

I’ve been using the technique from the excellent blog post https://martinklepsch.org/posts/better-clojurescript-node-repl-defaults.html thanks @U050TNB9F

steveb8n00:03:53

naively I added the preload to my shadow cljs instead of using the :config-merge technique. yes RTFM but it didn’t seem unreasonable at the time

steveb8n00:03:18

this broke my prod bundle/runtime. if preloads like this are present, Google Closure tried to require “goog.events.EventWrapper” before the global goog has been declared

steveb8n00:03:24

fingers burned. lesson learned. I wonder if it might save someone else some time to document this in Shadow docs or updating that blog post? thoughts?

steveb8n00:03:21

while on this topic: I’ve noticed that the uncaught handler does not work for errors inside core.async go blocks. Is there any way it could be possible for this to handle this? It would save me a lot of terminal node restarts