This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-12
Channels
- # announcements (1)
- # babashka (67)
- # beginners (39)
- # calva (56)
- # clojure (72)
- # clojure-berlin (3)
- # clojure-boston (1)
- # clojure-europe (10)
- # clojure-nl (1)
- # clojure-norway (67)
- # clojure-uk (5)
- # clojurescript (7)
- # emacs (21)
- # figwheel-main (5)
- # graalvm (24)
- # hyperfiddle (26)
- # missionary (5)
- # music (1)
- # off-topic (21)
- # polylith (4)
- # releases (2)
- # sci (3)
- # shadow-cljs (25)
- # squint (28)
Does shadow-cljs support wildcards in package.json exports? I have a package with "./*.js": "./dist/src/*.js"
but shadow is failing to resolve the relative import "./utils.js"
I verified that ./dist/src/utils.js
indeed exists, hence my question
it does but thats not a valid wildcard. wildcard as far as I could tell from the non-existent spec are added as-is
Thanks! Modifying the exports helped resolved this error but now I need to deal with files that are being imported without file extensions at all. Thankfully this is an internal library, and this seems more like an issue with the library rather than shadow.
could be that my implementation is totally wrong. I basically had to reverse engineer everything since the docs overall are more than lacking
I’m trying to run tests for my app with Karma as per https://shadow-cljs.github.io/docs/UsersGuide.html#target-karma. However, the app reads config from the html dom (which I provide in index.html
) For Karma this fails, at least with the basic setup, since I don’t know how to give Karma the needed config in the dom. Anyone understand enough about what I am talking about to give me a pointer?
kinda hard to give more specific advice without knowing when you load the config or how it is actually used
I get the error even if I remove my tests for reading the config. But that’s probably because I have a def
like so:
(def ^:private config
(edn/read-string
(.-textContent (js/document.getElementById "app-config"))))
I’ll try removing that and see if I get the runner working at all. But then I would like it to be able to run my config tests too.might be possible to supply a html file for karma. I don't actually know, never used it
I’ve tried a while now to supply a html file. Should be possible, but I’ve spent a bit too much time on it now and will go for not reading the config in the tests.
Test that my config reading setup works. But it is basically just edn/readstring from the dom so I can skip it. Was the first time I supply config this way so I think that’s why I added a test for it.