How does dynamic import() work?

Like (.then (js/import "https://esm.sh/quickjs-emscripten@0.25.0") 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

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.