Two files
dist/index.js and dist/index.mjs will be generated with it and you are good to goPublish ESM and CJS in a single package
A short tutorial of shipping both ESM and CJS dual formats in a single NPM package.
https://antfu.me/posts/publish-esm-and-cjs

Seonglae Cho