This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-05
Channels
- # beginners (46)
- # calva (89)
- # cider (24)
- # clara (7)
- # clj-kondo (36)
- # clojure (33)
- # clojure-australia (4)
- # clojure-dev (9)
- # clojure-europe (15)
- # clojure-israel (1)
- # clojure-nl (1)
- # clojure-uk (13)
- # clojurescript (55)
- # community-development (38)
- # conjure (1)
- # cryogen (12)
- # cursive (16)
- # data-science (4)
- # datomic (39)
- # events (2)
- # fulcro (5)
- # gorilla (3)
- # introduce-yourself (3)
- # jobs (9)
- # kaocha (5)
- # malli (16)
- # music (12)
- # off-topic (11)
- # polylith (4)
- # react (4)
- # reactive (1)
- # reagent (18)
- # remote-jobs (2)
- # reveal (2)
- # sci (4)
- # shadow-cljs (31)
- # timbre (4)
- # tools-build (70)
- # tools-deps (11)
- # vim (33)
- # xtdb (53)
Has anyone used @react-pdf/renderer with shadow-cljs?
I'm trying to decide if my errors are compatibility or a setup problem.
dynCall is not a function
hard to diagnose without more info. pdfjs is notorious for not working properly with bundlers so I made this example using the CDN version https://github.com/thheller/reagent-pdfjs
react-pdf seems to be using pdfkit. never tried that myself but maybe it has similar issues
Thanks I’ll poke around a bit and see what sense I can make of it.
I think this counts as a minimal repro: https://github.com/olivergeorge/shadow-vs-rpdfr/
checked it out. it appears that something in there requires some WASM code to be bundled. shadow-cljs currently can not do that
you can try https://code.thheller.com/blog/shadow-cljs/2020/05/08/how-about-webpack-now.html#option-2-js-provider-external and just use webpack
Thanks. Good to see there's an escape hatch. Was worries I would need to completely pull shadow out.
Sorry from missing the shadow config in the repro.
Stack trace shown in console is:
TypeError: dynCall is not a function
at Function.eval [as bind_value] (eval at buildCallerFunction (nbind.js:1), <anonymous>:1:96)
at _nbind_value (nbind.js:1041)
at module.exports (entry-common.js:241)
at Object.shadow$provide.module$node_modules$$react_pdf$yoga$src$dist$entry_browser (entry-browser.js:41)
at shadow.js.jsRequire (js.js:66)
at Object.shadow$provide.module$node_modules$$react_pdf$renderer$dist$react_pdf_browser_cjs (react-pdf.browser.cjs.js:22)
at Object.shadow.js.jsRequire (js.js:66)
at Object.shadow.js.require (js.js:113)
at eval (rpdf.ex2.js:2)
at eval (<anonymous>)
how can I specify lein profiles for each shadow build?
not supported. if you really must you can just use lein via lein with-profiles +whatever run shadow.cljs.devtools.cli release your-build
or so
I see. Thanks
if run from npx, shadow seems to ignore :lein {:profile "+cljs"}
?
Hey! I am trying to publish a chrome extension but I get a rejection because of code obfuscation, they provide an example of obfuscated code:
out/background.js:null:null: n(null, 1, [js, new n(null, 7, [Xh
How can I disable code obfuscation?
@dovganchin better to try shadow-cljs release app --pseudo-names
or shadow-cljs release app --debug
that'll still renamed and minify everything but give somewhat more usable names for stuff
is there a :target
for Chrome Extension? I see that mentioned in Basic Workflow
but can't find a section for that
there seems to be an example at https://github.com/binaryage/chromex/tree/master/examples/shadow Not sure if it still works...
the shadow-cljs part still works but I don't know what has changes regarding chrome extensions since then
this thread probably has the most info https://github.com/thheller/shadow-cljs/issues/279
What do these errors mean when compiling in :esm
target?
[:server] Compiling ...
[2021-10-06 07:09:53.234 - INFO] :shadow.build.npm/js-invalid-requires - {:resource-name "node_modules/keyv/src/index.js", :requires [{:line 18, :column 14}]}
[2021-10-06 07:09:53.501 - INFO] :shadow.build.npm/js-invalid-requires - {:resource-name "node_modules/express/lib/view.js", :requires [{:line 81, :column 13}]}
My requires look like:
["keyv$default" :as Keyv]
["express$default" :as express]