This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-12
Channels
- # babashka (6)
- # beginners (23)
- # calva (27)
- # cider (1)
- # clj-kondo (23)
- # cljsrn (2)
- # clojars (4)
- # clojure (90)
- # clojure-dev (8)
- # clojure-europe (1)
- # clojure-serbia (1)
- # clojure-spec (2)
- # clojurescript (9)
- # code-reviews (7)
- # core-async (1)
- # cursive (4)
- # datomic (13)
- # emacs (2)
- # hoplon (28)
- # juxt (12)
- # leiningen (1)
- # malli (22)
- # nrepl (3)
- # off-topic (51)
- # reitit (8)
- # shadow-cljs (16)
- # spacemacs (25)
- # sql (4)
- # test-check (5)
- # tools-deps (5)
Hello there, is there a way with shadow-cljs to compile a cljs
lib into a js bundle for the browser?
I am not sure. Maybe the fact that there is no entry point
you need to be more precise and describe what exactly "js bundle" means for you. there is always an entry point, even a lib will have at least one ns you'd use
A ns could be set as entry point. No need for a specific function?
By “js bundle” I mean that if I load this file in the browser, all the function of my lib are defined and callable
the usual ^:export
will make everything defined and callable. you can have as many of those in your lib as you want.
The use case is for libs that are not self host compatible, to make them usable in a Klipse snippet
I don’t need advanced compilation
I don’t want to force lib author to add ^:export to all the lib functions
so you are talking about CLJS libs being used by self-hosted CLJS? that would be a no then.
I mean there is https://code.thheller.com/blog/shadow-cljs/2017/10/14/bootstrap-support.html and you could in theory just compile all libs you want to be available together