ECMAScript feature: import attributes

January 13, 2025

The ECMAScript feature “Import Attributes” (by Sven Sauleau, Daniel Ehrenberg, Myles Borins, Dan Clark and Nicolò Ribaudo) helps with importing artifacts other than JavaScript modules. In this blog post, we examine what that looks like and why it’s useful.Import attributes reached stage 4 in October 2024 and will probably be part of ECMAScript 2025.

Source: ECMAScript feature: import attributes

MDN explains JavaScript import attributes “The import attributes feature instructs the runtime about how a module should be loaded, including the behavior of module resolution, fetching, parsing, and evaluation. It’s supported in import declarations, export…from declarations, and dynamic import().”

Here Axel Rauschmayer goers into detail about this already reasonably well supported (still waiting on Firefox) aspect of JavaScript.