feat: stabilise import maps (#9526)

This commit stabilises import maps by removing requirement
on "--unstable" flag when "--import-map" flag is used.
This commit is contained in:
Bartek Iwańczuk 2021-03-01 12:41:22 +01:00 committed by GitHub
parent 7cd14f97c9
commit 0dc89c0a79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 41 deletions

View file

@ -1,19 +1,9 @@
## Import maps
> This is an unstable feature. Learn more about
> [unstable features](../runtime/stability.md).
Deno supports [import maps](https://github.com/WICG/import-maps).
You can use import maps with the `--import-map=<FILE>` CLI flag.
Current limitations:
- single import map.
- no fallback URLs.
- Deno does not support `std:` namespace.
- supports only `file:`, `http:` and `https:` schemes.
Example:
**import_map.json**
@ -37,7 +27,7 @@ console.log(red("hello world"));
Then:
```shell
$ deno run --import-map=import_map.json --unstable color.ts
$ deno run --import-map=import_map.json color.ts
```
To use starting directory for absolute imports: