This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-04
Channels
- # announcements (4)
- # babashka (15)
- # beginners (147)
- # bristol-clojurians (8)
- # calva (6)
- # chlorine-clover (39)
- # clj-kondo (29)
- # clojure (95)
- # clojure-australia (1)
- # clojure-berlin (1)
- # clojure-europe (24)
- # clojure-nl (3)
- # clojure-spec (185)
- # clojure-uk (98)
- # clojured (2)
- # conjure (3)
- # core-async (26)
- # datomic (11)
- # etaoin (1)
- # events (1)
- # fulcro (26)
- # graalvm (3)
- # graphql (4)
- # jobs (7)
- # jobs-discuss (1)
- # kaocha (12)
- # leiningen (21)
- # malli (2)
- # meander (2)
- # parinfer (3)
- # pathom (3)
- # pedestal (5)
- # remote-jobs (2)
- # shadow-cljs (71)
- # spacemacs (2)
- # sql (4)
- # tools-deps (22)
- # tree-sitter (1)
- # vim (2)
- # xtdb (5)
Hello all, I´m sorry about my dumb question, but is there any way to see the source of clojurescript in browser source?
I don't really understand the question. You want an arbitrary server to serve the JS that is compiled by shadow? It should be enough to include the JS in some page then and serve that while running the shadow watch-job. That is not different than using shadow with a Ring webserver and I guess you'll find some tutorials on how to set that combination up.
Eh yeah I think my answer was actually nonsense too - https://stackoverflow.com/questions/60543802/get-sourcemapped-source-place-in-browser
2020-11-04 09:21:57,377 [XNIO-1 I/O-1] DEBUG io.undertow.websockets.core.request - UT025003: Decoding WebSocket Frame with opCode 1
How do I turn this off on the shadow-cljs server log?
my SLF4J config has an entry <logger name="org.xnio.nio" level="warn" />
but it doesn't seem like shadow reads that.
@d.eltzner012 the logger org.xnio.nio
doesn't affect io.undertow
so you need to add that too. its your logging setup so you need to configure it.
woops sorry, I'm blind. actually was not "my logging setup" in that someone else set it up and I didn't find the time to deal with it yet. sorry to bother with that
@fabrao I do not understand the questions. you can use any webserver you want. just serve the generated .js files like any other static file.
@thheller Sorry, I thougth that custom server would be a problem about not showing `.cljs` source in browser. Now I know that is a shadow-cljs
limitation
the only thing you have to watch out for is setting the correct :asset-path
in your build config
do you get warnings/errors when loading the page about missing source maps? otherwise it should just work (assuming you are talking about watch
or compile
builds)
source maps have worked forever so shadow-cljs version doesn't matter much. this is fine.
but you said something about external webserver? did you make sure that server does serve source maps correctly?
it´s pedestal from lacinia graphql, and I included the part about serving other stuffs
you can also just try loading
(or whatever port you are on) to see if its served correctly
Is there any way to disable the hot reloading for target :chrome-extension? I tried :devtools {:autoload false}
and it didnt work
yeah looks like its hardcoded to be enabled https://github.com/thheller/shadow-cljs/blob/ad8ea9d4aefc5d1c0ab371613a9c96c17da3d447/src/main/shadow/build/targets/chrome_extension.clj#L84
Cause it messes up the reloading of my chrome extension. If I use compile
after every code change it works, but the watch
inserts multiple instances of the content script
Could you make it a variable?
Yeah it is. I'm trying to set it up in a way that I don't have to reload the web page for every code change. If it works with the auto load to false I'm happy to share the setup. It would make the chrome extension development 10x faster
Thanks a million. Seems to work now