How does dynamic import() work?

Like (.then (js/import "") js/console.log), but js/import isn’t there.

import is currently a bit tricky to use since the closure compiler does not support it, or rather wants to compile it away and fails.

There is a helper in shadow-cljs when using target :esm. There is also js-await to make that promise handling a bit nicer.

1 Like