npm-esm-vs-cjs
npm-esm-vs-cjs copied to clipboard
'@puppeteer/browsers' is classified as cjs?
I have noticed that @puppeteer/browsers seems to be classified as cjs although the exports map contains both require and import. It looks like dual esm/cjs packages might not be always detected correctly?
Also, I verified that for @puppeteer/browsers the ESM version is correctly picked up by Node's module loader.
Impossible to track every engine, and what it will end up with, and whether that actually works at runtime. But, "type": "commonjs", is what I see, and that's probably what the code uses to decide. Instead of looking further. PR welcome, if you want to look into this!