This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-24
Channels
- # announcements (3)
- # aws (5)
- # babashka (10)
- # beginners (61)
- # calva (22)
- # clara (9)
- # clj-kondo (8)
- # cljdoc (8)
- # cljsrn (15)
- # clojure (44)
- # clojure-australia (2)
- # clojure-europe (31)
- # clojure-hungary (20)
- # clojure-nl (5)
- # clojure-uk (3)
- # core-logic (2)
- # cursive (2)
- # data-science (2)
- # datalevin (4)
- # datascript (6)
- # datomic (17)
- # defnpodcast (1)
- # figwheel-main (1)
- # fulcro (18)
- # graalvm (2)
- # introduce-yourself (2)
- # jobs (1)
- # jobs-discuss (59)
- # lsp (44)
- # music (1)
- # nrepl (2)
- # off-topic (26)
- # pedestal (2)
- # re-frame (12)
- # reagent (27)
- # releases (1)
- # remote-jobs (4)
- # rewrite-clj (2)
- # sci (12)
- # shadow-cljs (12)
- # sql (10)
- # uncomplicate (6)
- # vim (12)
- # xtdb (2)
Anyone familiar with these kind of compilation errors in the three.js ecosystem ? Simply just installing and trying to require @react-three/fibre
or @react-three/drei
is enough to get this error.
Closure compilation failed with 2 errors
--- node_modules/three-stdlib/index.cjs.js:2
Illegal variable reference before declaration: i
--- node_modules/three-stdlib/index.cjs.js:2
Illegal variable reference before declaration: t
yeah I'm not sure if this is a bug in the closure compiler or an actual bug in the lib
might be this one https://github.com/google/closure-compiler/issues/2723
@U0G75S29H I ran into it, currently running versions "@react-three/drei": "^7.5.0", "@react-three/fiber": "6.1.1", And have in my shadow-cljs.edn module:
:js-options { :resolve {"three-stdlib" {:target :file :file "node_modules/three-stdlib/index.js"}
"@react-three/drei" {:target :file :file "node_modules/@react-three/drei/index.js"}
"@react-three/fiber" {:target :file :file "node_modules/@react-three/fiber/dist/react-three-fiber.esm.js"}}}
@thheller I just found out that there is a new :preprocess
option for foreign libs in clojurescript compiler. Are there any plans to leverage that for npm libs in shadow-cljs?
shadow-cljs doesn't support foreign-libs at all, so no preprocess either. what problem are you trying to solve?
a JSX example setup is described here https://shadow-cljs.github.io/docs/UsersGuide.html#_javascript_dialects
there is an example setup using tailwind here https://github.com/jacekschae/shadow-cljs-tailwindcss