fix: Add Babel compatible __esModule export

This commit is contained in:
ExE Boss 2019-04-27 09:30:00 +02:00
parent 7b9211be50
commit 6ecae72e83
No known key found for this signature in database
GPG key ID: BF4FA5DD733D8D1A

View file

@ -197,6 +197,9 @@ const chalkTag = (chalk, ...strings) => {
Object.defineProperties(Chalk.prototype, styles);
module.exports = Chalk(); // eslint-disable-line new-cap
module.exports.supportsColor = stdoutColor;
module.exports.default = module.exports; // For TypeScript
exports = module.exports = Chalk(); // eslint-disable-line new-cap, no-multi-assign
exports.supportsColor = stdoutColor;
// For TypeScript and Babel:
exports.default = module.exports;
Object.defineProperty(exports, '__esModule', {value: true});