Node.js—I just learned that there is:

npm init --init-type=module --yes

But it doesn’t help much. I’ll probably continue to use `npm init` without that flag and change "commonjs" to "module" manually.

It feels like npm could switch to "module" as the default now.

Comments