Skip to content
This repository was archived by the owner on Jul 21, 2020. It is now read-only.

Commit c73b7bc

Browse files
authored
Document how to use with ES6 module setting
See #5.
1 parent a795a8b commit c73b7bc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

readme.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@ There are a few limitations compared to the original `ava` CLI, however.
9090
* No babel support
9191
* No power assert
9292

93+
## Frequently Asked Questions
94+
95+
<details>
96+
<summary>How to use AVA-TS when the <i>module</i> compiler option is set to ES6 modules?</summary>
97+
98+
Especially when working with bundlers like webpack you will encounter this issue. Fortunately, there is a simple fix to make TypeScript emit node-style modules when running AVA-TS:
99+
100+
```sh
101+
TS_NODE_COMPILER_OPTIONS='{"module":"commonjs"}' ava-ts
102+
```
103+
104+
If you feel this use case needs to be improved, complain in #5 😉
105+
</details>
106+
93107

94108
## License
95109

0 commit comments

Comments
 (0)