From 802fbd5ccaa8bed969b7eb8e83ee788936972c27 Mon Sep 17 00:00:00 2001 From: bitfish Date: Tue, 4 Jun 2019 17:41:32 +0800 Subject: [PATCH] Update tsconfig.json --- tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 11d5f3e..4cf080c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,10 @@ "compilerOptions": { /* Basic Options */ "target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ - "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + + // ts-node 目前不支持es2015的的模块机制 + // https://github.com/TypeStrong/ts-node/issues/313#issuecomment-343698812 + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */