Skip to content

Issue with CJS default exports #17

@ghost

Description

I've tested the exports from this package which fail using require since the default exports in TS are translated to exports.default = BaseRegression when compiling the code to CJS.

The imports work well using the import syntax, so Typescript or esm modules seem to be fine.

Using named exports will cause updates upstream since it will be breaking.

I'm just raising the issue so you may decide or discuss what is the best option.

The only way to keep the same syntax (no named exports) that I find (I think) is to export 2 different index files, one goes to module, one to CommonJS.

The other way, is the named exports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions