You cannot dynamically require in general, so yes not feasible
@dnolen would it be possible to do it the same way resolve works (ie not dynamic)
resolve already exists as macro time operation
See the docs on codesplitting
I'm not after code splitting fwiw.
I know
But you’re looking for an example
See also cljs.anayzer.api
@dominicm no there cannot be a static (requiring-resolve 'foo.bar/something)
since require
itself is async in CLJS
(and might require compilation which won't be available in release builds)
where is fn*
handled?
Are you playing with async/await? I can share a branch in cljs with async function and await implemented in the compiler when I get to my laptop
That would be awesome
https://github.com/roman01la/clojurescript/commit/afdecc3af966c6
https://twitter.com/roman01la/status/1155602189311717377?s=20
I see it used in cljs.core but not where it’s defined or handled (assuming it’s a special symbol)
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L2106
ty!