Skip to content

Commit

Permalink
Added ts-node config to correct module type
Browse files Browse the repository at this point in the history
* This was required to run ava tests as .ts file
   - Fixes "SyntaxError: Cannot use import statement outside a module"
* Found this as work around noted here
   - TypeStrong/ts-node#922 (comment)
  • Loading branch information
jkasten2 committed Mar 14, 2021
1 parent c293f0c commit 578f282
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"extends": "./build/config/tsconfig.json",
// Options here only apply to IDE, build compile options defined in the build tsconfig.json above.
"ts-node": {
"compilerOptions": {
"module": "commonjs"
}
},
"compilerOptions": {
"strictNullChecks": true,
"checkJs": true,
Expand Down

0 comments on commit 578f282

Please sign in to comment.