The files in dist/esm are not valid ESM because:
- The folder is missing a
package.json with { "type": "module" } in it, OR files use a .js extension instead of .mjs (since the closest package.json states the package is using CJS)
- Relative imports in those files don't have an extension
This causes esbuild (for my case) and maybe other bundlers to discard this entrypoint and fallback to the CJS one instead (TypeScript resolution also points towards the CJS entrypoint, even when consumed from ESM code).
Do you think you might be able to fix the entrypoint to make ESM code able to consume ESM from your package as well? 🙏
The files in
dist/esmare not valid ESM because:package.jsonwith{ "type": "module" }in it, OR files use a.jsextension instead of.mjs(since the closestpackage.jsonstates the package is using CJS)This causes esbuild (for my case) and maybe other bundlers to discard this entrypoint and fallback to the CJS one instead (TypeScript resolution also points towards the CJS entrypoint, even when consumed from ESM code).
Do you think you might be able to fix the entrypoint to make ESM code able to consume ESM from your package as well? 🙏