From ba8533ae3b258f2a9039eebe002ceb434196fac3 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 17 Jul 2025 21:22:02 -0400 Subject: [PATCH] clarify cache key behavior --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 90e0a4d..bd87244 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,12 @@ All of the import statements in the module graph that address the same module wi The determination of whether the `type` attribute is part of the module cache key is left up to hosts (as it is for all import attributes). +For example, `import "foo"` and `import "foo" with { type: "buffer" }` may return the same module in one host, and different modules with another host. Both are valid implementations. + +However, a dynamic import and a static import with the same `type` will return the same module, regardless of host. + +See discussion in Issue https://github.com/styfle/proposal-import-bytes/issues/4 + ### Is there any prior art? Deno 2.4 added support in [July 2025](https://deno.com/blog/v2.4) to inline a Uint8Array