Commit 9259f10
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]>1 parent a41ff55 commit 9259f10
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments