You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hacking together a simple framework like Next.js for denobyexample.com. I'm using oak as the server framework. In one of my middleware functions, I'm loading modules dynamically like:
I think it is unrelated to #4561. It is a larger defect that we should have tested for.
It relates to the situation that we statically analyse all imports, so they can be made asynchronously before we invoke the TypeScript compiler (because the compiler only supports synchronous imports). But the preprocessing does account for all statically determinable imports, only those where the string is itself static. So in this case the dynamic import fails. We basically need a backup to when the preprocessing fails, as the preprocessing will always have its limits.
I'm hacking together a simple framework like Next.js for denobyexample.com. I'm using oak as the server framework. In one of my middleware functions, I'm loading modules dynamically like:
This produces the following 2 errors:
If the import is static like:
Everything works great.
Should this be supported? I saw this PR #4561 and thought it was referencing these types of scenarios.
Thanks for the help!
FYI @kitsonk
The text was updated successfully, but these errors were encountered: