JavaScript import maps can be injected dynamically today using a classic blocking script that creates a `<script type="importmap">` element via DOM methods and inserts it after itself using `document.currentScript.after()`. This technique works back to Chrome 89, Safari 16.4+, and Firefox 108+, and is already used by JSPM v4.

7m read time From lea.verou.me
Post cover image
Table of contents
How does it work?Do we still need external import maps?Enjoyed this post?Reactions

Sort: