From 578f282e94a137ab8c7ce2792504891dd37c4dd9 Mon Sep 17 00:00:00 2001 From: Josh Kasten Date: Sun, 14 Mar 2021 02:27:44 +0000 Subject: [PATCH] Added ts-node config to correct module type * 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 - https://github.com/TypeStrong/ts-node/issues/922#issuecomment-673155000 --- tsconfig.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tsconfig.json b/tsconfig.json index 7b58fe7ee..f50ba4ae8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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,