Your ES modules examples weren't exactly ES modules. I believe in the actual specification you had to have .js extensions in imports and you can only import from URLs and relative paths. It was module bundlers which popularized the syntax you are using which is kind of the same as with NodeJS. If you are using a bundler you can import a library from it's name, if you aren't you have import it from an NPM CDN such as skypack.