Skip to content

Commit

Permalink
fix(ts): support es module export (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore authored Sep 27, 2018
1 parent 3c5aeb7 commit de262c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,5 @@ class Base extends EventEmitter {
}

module.exports = Base;
// support es module
module.exports.default = Base;
2 changes: 1 addition & 1 deletion test/fixtures/ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"baseUrl": ".",
"module": "commonjs",
"lib": [ "es7" ],
"esModuleInterop": true,
"esModuleInterop": false,
"strict": true
}
}

0 comments on commit de262c1

Please sign in to comment.