Skip to content
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

Closed
kitsonk opened this issue Mar 12, 2019 · 4 comments
Closed

Implement import-maps #1921

kitsonk opened this issue Mar 12, 2019 · 4 comments
Milestone

Comments

@kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Mar 12, 2019

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:

$ deno --importmap import-map.json main.ts
@ry

This comment has been minimized.

Copy link
Collaborator

@ry ry commented Mar 29, 2019

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

@ry ry added this to the v0.4 milestone Mar 29, 2019
@kitsonk

This comment has been minimized.

Copy link
Contributor Author

@kitsonk kitsonk commented Mar 29, 2019

That is needed for tscconfig.json too...

@bartlomieju

This comment has been minimized.

Copy link
Contributor

@bartlomieju bartlomieju commented May 11, 2019

FYI I'm working on this. I'll put up PR for review shortly

@bartlomieju bartlomieju mentioned this issue May 15, 2019
2 of 2 tasks complete
@ry ry mentioned this issue Jun 5, 2019
ry added a commit to ry/deno that referenced this issue Jun 5, 2019
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)
ry added a commit that referenced this issue Jun 5, 2019
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 (#1789) and import
maps (#1921)
@bartlomieju

This comment has been minimized.

Copy link
Contributor

@bartlomieju bartlomieju commented Jun 9, 2019

Support for import maps landed in #2360 🎉

@ry ry closed this Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.