Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(module): switch to commonjs2 libraryTarget (#379)
Emit `__esModule` indicators for ES modules to distinguish between them and CommonJS modules. If libraryTarget is set to `commonjs`, the bundle does not match the interface provided by the type declarations because `default` imports end up as `module.exports`, e.g.: ``` import transformer from 'ts-auto-mock/transformer'; // commonjs -> { default: [Function (anonymous)] } import transformer from 'ts-auto-mock/transformer'; // commonjs2 -> [Function (anonymous)] ✓ ``` Co-authored-by: Vittorio Guerriero <[email protected]>
- Loading branch information