From de262c1e41e65a5fb11e95a95f96c6c561cb9d23 Mon Sep 17 00:00:00 2001 From: Haoliang Gao Date: Thu, 27 Sep 2018 21:52:36 +0800 Subject: [PATCH] fix(ts): support es module export (#15) --- index.js | 2 ++ test/fixtures/ts/tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 6fddb06..7989f36 100644 --- a/index.js +++ b/index.js @@ -170,3 +170,5 @@ class Base extends EventEmitter { } module.exports = Base; +// support es module +module.exports.default = Base; diff --git a/test/fixtures/ts/tsconfig.json b/test/fixtures/ts/tsconfig.json index c24800c..ff52b19 100644 --- a/test/fixtures/ts/tsconfig.json +++ b/test/fixtures/ts/tsconfig.json @@ -4,7 +4,7 @@ "baseUrl": ".", "module": "commonjs", "lib": [ "es7" ], - "esModuleInterop": true, + "esModuleInterop": false, "strict": true } }