Closed tachibana-shin closed 1 year ago
This is a Blob-specific problem.
Import specifier resolution is always relative to the module's URL. (It is not relative to any of the different specifiers you have mapped that to, of which there could be many.)
Blobs have URLs like blob:https://whatwg.org/d0360e2f-caee-469f-9a2f-87d5b0456f6f
. You cannot resolve ./log.js
relative that URL.
Any plans for the future? I'm writing an online editor for my library. If there's no workaround, I'm going to have to write a compiler for files into standard input.
No, there are no plans to change how relative URLs resolve relative to blob:
URLs.
This seems confusing, so I'm going to explain this as follows: I have a directory tree:
I reported the import map as follows:
and in
main.js
I enteredlog.js
this seems difficult because according to the declaration, when
import "./log.js"
is interpreted it becomesimport "src/log.js"
but it does not resolve the path when i declare at importmap.Example use Blob