npm install js-to-mjsReplace .js with .mjs recursively
Node.js will adopt ES modules with the special file extension, .mjs.
j2m recursively finds all the .jss imported from an entry script and replaces them with .mjss.
`` bash`
$ npm i -g js-to-mjs
` bash`
$ j2m index.js # entry script
$ j2m -d index.js # dry run
` bash``
$ npm i # install deps
$ npm test # run tests
$ node . -d test/fixtures/index.js # test-run with fixtures
- @std/esm: ES modules in Node today!