This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-18
Channels
- # announcements (5)
- # aws (4)
- # babashka (30)
- # beginners (90)
- # calva (31)
- # clj-on-windows (16)
- # clojure (110)
- # clojure-dev (10)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (20)
- # clojure-spec (25)
- # clojure-uk (15)
- # clojured (2)
- # clojurescript (12)
- # code-reviews (2)
- # community-development (3)
- # conjure (14)
- # datomic (15)
- # defnpodcast (2)
- # events (1)
- # fulcro (17)
- # graalvm (8)
- # gratitude (1)
- # introduce-yourself (2)
- # jobs-discuss (7)
- # kaocha (6)
- # lsp (9)
- # luminus (5)
- # nextjournal (7)
- # observability (9)
- # off-topic (71)
- # portal (5)
- # practicalli (1)
- # rdf (21)
- # re-frame (15)
- # releases (1)
- # shadow-cljs (24)
- # testing (7)
- # tools-build (13)
- # tools-deps (14)
- # xtdb (7)
Based on https://code.thheller.com/blog/shadow-cljs/2020/05/08/how-about-webpack-now.html#option-2-js-provider-external I'm switching to :js-provider :external because @react-pdf/renderer
is incompatible (wasm) with the standard bunding approach. That means an extra step to run webpack
after shadow-cljs compile
to build a single js file.
Wondering what the best way to handle the dev time case. Should I use :build-hooks
to trigger the webpack after each build?
Huh, got the PDF viewer working but broke everything else!
Module not provided: shadow.js.shim.module$react
check the :internal-index
generated by shadow-cljs. it should contain require("react")
it only needs to run if you actually change npm requires, it does not need to run when you only work on cljs sources
webpack must never process the regular output of shadow-cljs, only the :external-index
Ah, "one single file" was confusing. Was aiming at a lib.js and an app.js.
Thanks.
I'll do a simple repro and try and get a handle on it. It'd be lovely to keep shadow-cljs... this react-pdf lib just keeps sneaking in as a requirement (enterprise clients)
Thanks but no CDN for this one I know of
Basics work :-)
Will look into my other issue
Hopefully unrelated