From 999cbfb52bc42c58467e3592d5fead9c4ee8a2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 18 Jul 2022 20:05:26 +0200 Subject: feat: import.meta.resolve() (#15074) This commit adds new "import.meta.resolve()" API which allows to resolve specifiers relative to the module the API is called in. This API supports resolving using import maps. --- cli/tests/testdata/import_meta.importmap.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cli/tests/testdata/import_meta.importmap.json (limited to 'cli/tests/testdata/import_meta.importmap.json') diff --git a/cli/tests/testdata/import_meta.importmap.json b/cli/tests/testdata/import_meta.importmap.json new file mode 100644 index 000000000..f8c056afd --- /dev/null +++ b/cli/tests/testdata/import_meta.importmap.json @@ -0,0 +1,11 @@ +{ + "imports": { + "bare": "https://example.com/", + "https://example.com/rewrite": "https://example.com/rewritten", + + "1": "https://example.com/PASS-1", + "null": "https://example.com/PASS-null", + "undefined": "https://example.com/PASS-undefined", + "[object Object]": "https://example.com/PASS-object" + } +} -- cgit v1.2.3