There is a Google Web Fundamentals article “Using JavaScript modules on the web” that explains how to use ECMAScript modules in browsers, such as via <script type="module">
. It includes a section titled “A note on file extensions” that encourages developers to use the .mjs
file extension, with the reasoning being that developers should want to tell apart their ES Module code from their Script code and also to save files for use with Node’s --experimental-modules
implementation (at least, until it’s replaced with the new version that allows ES modules in .js
files).
Most interesting to me, though, was the section “Web adoption of JS modules” with a link to usage counters