tmcwT
Denoβ€’3y agoβ€’
7 replies
tmcw

Is there any way to get Deno to not statically analyze import()?

I understand that statically analyzing and fetching dynamic import() calls is a good thing for performance, but it's making my usecase impossible - I want to import user code, which may crash, and to handle the error if it, say, throws an error on import. I can do this with browser import(). I can do it with Node. I can't do it with Deno: you basically can't use import statements like you'd expect to if you read the MDN page, which seems like a major move away from this being web-standardsy and also makes dynamic import way less useful. Is there a way to actually dynamically load code, at runtime, that I'm missing?
Was this page helpful?