fix: Add Babel compatible __esModule export
This commit is contained in:
parent
7b9211be50
commit
6ecae72e83
1 changed files with 6 additions and 3 deletions
9
index.js
9
index.js
|
|
@ -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});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue