Removed unused _require method

This commit is contained in:
Maurício Szabo 2023-05-26 21:04:42 -03:00
parent d1314fc76c
commit a456d9bf3e

View File

@ -927,27 +927,6 @@ module.exports = class Package {
}
}
// a require function with both ES5 and ES6 default export support
_require(path) {
const modul = require(path);
if (modul === null || modul === undefined) {
// if null do not bother
return modul;
} else {
if (
modul.__esModule === true &&
typeof modul.default === 'object' &&
typeof modul.default.activate === 'function'
) {
// __esModule flag is true and the activate function exists inside it, which means
// an object containing the main functions (e.g. activate, etc) is default exported
return modul.default;
} else {
return modul;
}
}
}
getMainModulePath() {
if (this.resolvedMainModulePath) return this.mainModulePath;
this.resolvedMainModulePath = true;