Import maps

на сайте с December 19, 2022 23:04
Or, how to control the behavior of JavaScript imports. This proposal allows control over what URLs get fetched by JavaScript import statements and import() expressions. This allows "bare import specifiers", such as import moment from "moment", to work. The mechanism for doing this is via an import map which can be used to control the resolution of module specifiers generally. As an introductory example, consider the code.