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.
I've tested the exports from this package which fail using
requiresince the default exports in TS are translated toexports.default = BaseRegressionwhen compiling the code to CJS.The imports work well using the
importsyntax, 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.