Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix): respect tsconfig esModuleInterop flag (#327)
- the previous assumption that ESM users will always import the ESM build doesn't actually hold up in practice due to various limitations in Node and testing and the prevalence of transpiling in general - even if one uses mostly ESM, many tools will require and use the CJS build, and this option would break compatibility - without esModule set, CJS users would be unable to use the default export of any library built with tsdx - and this was not documented, meaning it would cause unintended breaking changes in libraries that use default exports and try to adopt tsdx - it would also break compatibility with certain tooling - so, instead of always setting rollup's esModule to false and potentially causing unintended consequences, respect the user's esModuleInterop config as set in their tsconfig, but default to false
- Loading branch information