-
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
Allow wildcards in import maps #2588
Comments
ref: WICG/import-maps#7 |
import-maps looks like it's moving real slow.... hopefully Deno doesn't wait for it to reach a conclusion |
@jpike88 @kevinkassimo I followed your discussion on Gitter. It seems WICG/import-maps#7 has stalled and there is no consensus yet. I would very much like to avoid implementing parts that are not yet specced - also there are other parts on spec that we should have before that (ie. merging import maps). That said I believe you could make it work with little change to your import map:
Also we might discuss some further use of |
Great... but now I've run into #2506 |
My opinion is not to use something that isn't on a standard track. The behaviour of |
But that will create a rather annoying barrier for entry for existing codebase migrations, and cause confusion amongst devs who are experienced in TS conventions, myself included. It's not just a minor tweak in a config file, it's a fundamental change to how our projects are structured, beyond current TS conventions and rules. I haven't even heard of import-maps till now, and I'll may never have to if I don't use deno, as it would be entirely up to the whims of TS. Like I said in my other comment, you could wait it out until the TS team decides to make the requisite tweaks to match these standards. But that might delay exposure and adoption of deno for quite some time. If that's intentional, then I guess I have no argument. |
You will hear of import-maps, it solves a big problem that people have been avoiding. Chrome shipped the first built-in module, and it uses import maps is specifically designed to allow the loading of polyfills where the modules are not built in. Built in modules are a thing, import maps are a thing. Just because you weren't aware of them doesn't mean they weren't a thing. One could argue we aren't building something for today, we are building something for tomorrow. Deno is very unstable. It will likely still have major breaking API changes, but we know some principles, which are to build on open web standards. We waited to even consider solving the problem of module remapping until import maps shipped in at least one browser. Also, Deno isn't designed to be TypeScript only. It can and should run JavaScript just perfectly fine and tying a feature related to resolving modules to a TypeScript configuration file doesn't make a whole load of sense in my opinion. |
I agree on this part. Deno is born to experiment with new standards and more web APIs. It is destined to be unstable at this moment, like the early days of Node. But it is different from Node nowadays, what Node might dare not to do because of backward compatibility and community backlash for even simply a small behavioral change, we go and experiment for better. Otherwise why are we even trying to build it? TypeScript is built with the knowledge of existing technologies. Deno is too new to the TypeScript people, just like Node was too new to v8 people years ago. Node only receives decent attention from v8 after it grows along its own path, and I would imagine the same for Deno if it were to be successful, under the precondition that I (personally) would rather it fail instead of surviving under the unreasonable fear from the Old Ones (tipping hat to Lovecraft). |
Well, they know quite a lot about us... But diverting core team engineering effort is a different story. We have snapshotting capability in Deno, something that TypeScript was looking at to increase the performance of |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Import maps has started to ship in Chromium. We will continue to align to the standard. Support for features should be done with the standard. |
This is my import map, taking straight from tsconfig/paths
I get this error
Wildcards are important for pulling in shared codebases, keeping paths standardised across multiple projects. And also maintains proper compatibility with tsconfig paths statements.
This allows me to keep my import statements nice and compact, for readability's sake.
The text was updated successfully, but these errors were encountered: