Skip to content

v2.3.0-beta build is not esm compliant #204

@sachinraja

Description

@sachinraja

In the new v2.3.0-beta build, outExtension was overridden with the build format:

outExtension({ format }) {
return {
js: format === 'cjs' ? '.js' : `.${format}.js`,
};
},

This is not compliant with esm. tsup emits with the .mjs extension by default because packages with "type": "commonjs" (all packages implicitly have this) must use the .mjs extension for esm files according to Node's resolution. Bundlers may be more forgiving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions