-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Implement import-maps #1921
Comments
I have been waffling on this issue for a while but (after some technical debates with people) am convinced. Let's do it. The way you proposed, via command-line argument, is how I think it should work too. Unfortunately our flag parsing is quite bespoke at the moment and doesn't support arguments, so before anything can be done we need to fix #1987 |
That is needed for |
FYI I'm working on this. I'll put up PR for review shortly |
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)
Support for import maps landed in #2360 🎉 |
We should consider finding a way to implement import-maps. The WICG proposal has started to be implemented. While it is still an early stage, it would solve several problems we have had with remote modules.
It is implemented in Chromium 74.
In browsers, it is a
<script type="importmap">...</script>
or<script type="importmap" src="import-map.json"></script>
. I would suggest for Deno, that the map is passed as a parameter. For example:The text was updated successfully, but these errors were encountered: