require('vorpal-as-default').default
aegyed91 opened this issue · comments
Attila Egyed commented
something goes wrong in the transpilation process
const asDefault = require('vorpal-as-default').default;
lib/index.js:
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (vorpal, name) {
var isCommandExists = vorpal.find(name);
var isHistoryEmpty = !vorpal.cmdHistory.getPreviousHistory();
if (isHistoryEmpty && isCommandExists) {
vorpal.execSync(name);
}
return vorpal;
};
Miles Johnson commented
@tsm91 This is how Babel transpilation works. If you import using CommonJS, you will need to append .default
.