-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dynamic import #1789
Comments
I also need this feature!!! |
Just to be clear, this was implemented but during the re-write to use ESM natively, it had to be dropped to be re-implemented later. It is currently sitting in @ry's backlog. |
This should happen in //core/ ... #1919 needs to land first. |
I want to complete async module loading before attempting this (which is essentially the same as this progress bar issue: #1320) |
update: async module loading has landed #2084 |
This patch makes it so that RecursiveLoad doesn't own the Isolate, so Worker::execute_mod_async does not consume itself. Previously Worker implemented Loader, but now ThreadSafeState does. This is necessary preparation work for dynamic import (denoland#1789) and import maps (denoland#1921)
That's great happy that you are working for this key feature. but it's not work until 0.9.0. Here is what's happened on my computer, maybe help. Environmentdeno version
deno: 0.9.0
v8: 7.7.37
typescript: 3.5.1
on Ubuntu 18.04 Filestest-dynamic-import.js import('./imported.js').then( module=> {
console.log( module.default );
}, ); imported.js export default 'successful'; Result:deno run test-dynamic-import.js
thread 'tokio-runtime-worker-0' panicked at 'dyn_import callback not set', ../../core/isolate.rs:238:7
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
fatal runtime error: failed to initiate panic, error 5
bash: “deno run test-dynamic-import.js” terminated by signal SIGABRT (Abort) |
This has not been delivered yet. That is why the issue is still open. It is still being worked on. |
This is in preperation for dynamic import (denoland#1789), which is more easily implemented when errors are dynamic.
This is in preperation for dynamic import (#1789), which is more easily implemented when errors are dynamic.
Is there an option to disable caching the imported file? Maybe something like |
That would be a seperate request. Also, |
Looks like there's already one here #5548 |
I know this is already on the radar, but wanted to create a distinct issue.
(This is required for a test runner.)
The text was updated successfully, but these errors were encountered: