Skip to content

ESM/CJS detection #2837

@theoephraim

Description

@theoephraim

Describe the bug

Our package - https://npmx.dev/package/varlock - is showing as CJS supported and not ESM. It has "type": "module" and some default exports. There is also a "main": "dist/index.js" - I can't even remember why that main setting is there honestly. Probably some audit tool told me it was missing.

I'll likely swap this all over to .mjs files at some point as I'd prefer that explicitness - I think it's set up with .js filenames just because that's what tsup wants to spit out when it sees type=module.

But regardless this case seems like a bug.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    backServer, Data

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions