This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-14
Channels
- # announcements (1)
- # asami (3)
- # aws (1)
- # babashka (22)
- # beginners (39)
- # calva (21)
- # clj-kondo (10)
- # cljdoc (22)
- # cljs-dev (17)
- # clojure (93)
- # clojure-australia (3)
- # clojure-europe (39)
- # clojure-italy (3)
- # clojure-losangeles (17)
- # clojure-nl (14)
- # clojure-russia (2)
- # clojure-uk (5)
- # clojurescript (35)
- # community-development (7)
- # conjure (2)
- # cursive (13)
- # data-science (1)
- # datomic (25)
- # emacs (5)
- # events (4)
- # figwheel-main (2)
- # fulcro (12)
- # graphql (7)
- # gratitude (2)
- # inf-clojure (6)
- # leiningen (6)
- # lsp (49)
- # malli (13)
- # membrane (30)
- # minecraft (1)
- # pathom (3)
- # pedestal (26)
- # polylith (13)
- # portal (2)
- # quil (3)
- # random (1)
- # re-frame (13)
- # reagent (43)
- # reitit (6)
- # releases (1)
- # reveal (2)
- # ring (3)
- # shadow-cljs (30)
- # specter (5)
- # sql (8)
- # tools-build (1)
- # tools-deps (13)
- # videos (1)
I'm looking for the shadow-cljs.edn equivalent of
^:dev/always
So that it's behaviour is controlled by the :builds selection
Perhaps I'm unduely cautions. It doesn't seem to be used unless the NS is refrerenced. (I worried two conflicting ns would cause confuse)
dev-http server has to be running or css reloading doesn't work for me. Just want to mention it.
It doesn't. You just need to set :watch-dir
when using custom servers as described in the docs https://shadow-cljs.github.io/docs/UsersGuide.html#_css_reloading
Yeah I did exactly that last night and it didn't work. Somehow it's working this morning. :thinking_face:
@thheller I can confirm that upgrading the jdk version in CI fixed the OOM error. thanks again for the heads up
After setting up a web worker per this tutorial (https://shadow-cljs.github.io/docs/UsersGuide.html#_web_workers), I observed that the worker is making a waterfall of loads, each is a separate request to a namespace. Isn't this not ideal? Why couldn't it get these from the shared.js?
@zhuxun2 this is only during development. a release
build will just load the shared file
Given the following modules config
{:shared {:entries []}
:a {:entries [a.entry]
:depends-on #{:shared}}
:b {:entries [b.entry]
:depends-on #{:shared}}}
What could be the cause of this build error?
Module Entry "b.entry" was moved out of module ":b".
It was moved to ":shared" and used by #{:shared :b}.
@roman01la something in the :shared
or :a
module directly requiring the b.entry
ns. can't have that without either removing that require or making b depend on a
hmm, interesting, I don’t see any usage of b.entry
apart from in modules config
hm, are you saying that if the entry ns is app.b.entry
(that is not required anywhere) then requiring app.b
in :shared
will cause app.b.entry
to be moved into the shared
module? Does that mean that NS names hierarchy can impact how code splitting works?
@roman01la no, not at all. the hierachy does not matter at all. only the literal ns. in general the entry namespaces should not be directly required anywhere
use something like https://clojureverse.org/t/shadow-lazy-convenience-wrapper-for-shadow-loader-cljs-loader/3841 if you need to lazy reference code from the entry namespaces
by a -> c -> b
I meant a.entry
requires something.c
which requires b.entry
thus forcing b.entry to be moved since its supposed to be in :b
but can't
I’m trying to do a little demo showing shadow-cljs capabilities and as a part of a demo I’m installing an npm package, requiring it and rendering a view from it. Namely it’s react-calendar. But it seems like shadow does not pick up css automatically and I’m getting quite ugly calendar. Is there a way to solve that rather than including css directly to the index.html?
that is entirely subjective 😛 I use tailwind-css similar to this setup https://github.com/jacekschae/shadow-cljs-tailwindcss. some older projects of mine use node-sass
or if you intend to use many packages that basically expect webpack (by directly using css) you can just use webpack as described here https://code.thheller.com/blog/shadow-cljs/2020/05/08/how-about-webpack-now.html#option-2-js-provider-external
Hi guys! I'm new to shadow-cljs
, and working with shadow-cljs
through a custom build pipeline in our monorepo.
I'm getting an error when compiling, IOException: Cannot run program "node"
I am still doing some research to figure out exactly how the build is being called and help refine this question, but do you have any suggestions for how to interpret this error? It seems like shadow expects to find a node
executable somewhere, but it isn't finding the executable. Does node
need to be in the same directory?
you need to have https://nodejs.org/en/ installed yes
on the system path is enough, like any other executable. doesn't need to be in a special place
Thank you! We are doing a special build process through Bazel, which may run in a sandboxed environment, so I think that's the next thing I'll check for. I'm wondering if Node isn't being installed properly in the sandboxed environment.