A modern way to use JavaScript modules is with the script type="importmap" tag. This lets you to define a mapping of external module names to their corresponding URLs, making it easier to include and use external modules in your code.
Resources:
Import map documentation
JavaScript import maps are now supported cross-browser
Baseline
Watch more This is Baseline
Subscribe to Chrome for Developers