This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-06
Channels
- # adventofcode (54)
- # announcements (3)
- # babashka (34)
- # beginners (38)
- # calva (27)
- # cherry (5)
- # clj-kondo (34)
- # clojure (26)
- # clojure-bay-area (4)
- # clojure-berlin (3)
- # clojure-europe (26)
- # clojure-india (6)
- # clojure-nl (1)
- # clojure-norway (54)
- # clojure-uk (2)
- # conjure (3)
- # cursive (4)
- # data-science (1)
- # emacs (6)
- # events (4)
- # fulcro (2)
- # hugsql (6)
- # hyperfiddle (38)
- # lsp (3)
- # matrix (1)
- # membrane (5)
- # off-topic (27)
- # re-frame (3)
- # releases (1)
- # sci (8)
- # shadow-cljs (34)
- # squint (132)
I have an issue with :target :node-script
it doesn't update functions when I save a file. Shouldn't it do that, like it does in the browser? I think it did it before, but I'm uncertain.
I can evaluate the function manually. And then it gets updated. But I was fond of the workflow where I would just save a file. ๐
the workflow is the same, just might be doing something that can't be hot-reloaded. depends on what you are doing, but the limitations are the same as in the browser.
ok, I reduced everything down to basically nothing in order to find any such problems
but, then I know that there isn't an option in config or whatever. I will continue to see if I can find the reason.
ok, let me see
(ns
(defn saysome []
(js/console.log "hadfass"))
(comment
(saysome))
(defn main []
(js/console.log "Starting dev process")
(js/process.on "unhandledRejection"
(fn [err]
(js/console.log "ERROR")
(js/console.log err)
(tap> ["ERROR" err]))))
(defn start
"Hook to start. Also used as a hook for hot code reload."
[]
(js/console.warn "start called"))
(defn stop
"Hot code reload hook to shut down resources so hot code reload can work"
[done]
(js/console.warn "stop called"))
if I change saysome function it should hot reload when I save the file. Right?
depends on if you configured the :devtools {:after-load ...}
since there is no ^:dev/after-load
tag on start
yes I do have those configured
assuming of course that the node process properly connected back to shadow-cljs and didn't just immediately exit
:macro-dev {:target :node-script
:output-to "dist/runner/macro-dev.js"
:main
:compiler-options {:output-feature-set :es6}
:dev {:closure-defines {anr.fire.admin/EMULATOR true
anr.fire.admin/PROJECT-ID "macros-6d380"}}
:release {:closure-defines {anr.fire.admin/EMULATOR false
anr.fire.admin/PROJECT-ID "macros-6d380"}}
:devtools {
:before-load-async
:after-load
I can send the comment to the node environment from vim
I have to hurry. But thanks!
Hi. I experimenting with switching my Shadow/React/UIx/MUI app over to Preact
The preact docs talk about using resolve.alias
to magically rewrite module paths over to preact/compat
.
https://preactjs.com/guide/v10/getting-started/#aliasing-react-to-preact
Does shadow-cljs support this kind of js library aliasing?
If not, what are the recommended alternatives?
Will take a look.
Perfect
Thank you
I've been trying to integrate page-renderer
in my app, since I need a PWA that works offline. The problem is, I'm building a mostly static app to be served. In other words, I don't have a backend Clojure HTTP server running to handle traffic.
I thought maybe I could use shadow-cljs clj-run ...
to mimic what would normally happen, but that didn't work.
Then I tried following https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Tutorials/js13kGames/Offline_Service_workers
and had some success. Caching doesn't seem to work from the PWA when I turn on airplane mode. If I reload the page/app the console shows Content-Security-Policy: The page's settings blocked the loading of a resource at inline ("default-src")
. The service worker appears to be registered:
Ahhh it was a mess, but I figured it out. Part was scope, and part was bad formatting of a list in JS.
What is page-renderer
?
It couldn't wrangle it to fit my project. Had to massage the MDN code into something that worked.
Just updated by IntelliJ + Cursive to latest version and suddenly my watches are failing with
The required namespace "module" is not available, it was required by "shadow.js.shim.module$module$node_modules$react$index.js".
any ideas of things to check?I did some digging through my babashka tooling and found a task to reset the shadow-cljs cache, and now weโre back in business ๐
{:task (shell (str "rm -fr ./.shadow-cljs/builds"))}