Import ESM based on file source rather than .mjs extension or "type": "module"
npm install autoesm"type": "module" in package.json or .mjs file extension to indicate that the file is ESM.
"module" field in package.json for unpkg/pikacdn).
"type": "module" flag, but for now it saves nerves and time for running tests.
sh
node --experimental-loader autoesm ./test.js
``
ॐ