--- /dev/null
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const tslib_1 = require("tslib");
+const errorHandler_1 = require("./errorHandler");
+const resolve_from_1 = tslib_1.__importDefault(require("resolve-from"));
+const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
+/**
+ * Require package explicitly installed relative to given path.
+ * Fallback to bundled one if no package was found bottom up.
+ * @param {string} fspath file system path starting point to resolve package
+ * @param {string} pkgName package's name to require
+ * @returns module
+ */
+function requireLocalPkg(fspath, pkgName, options = { silent: true, ignoreBundled: false }) {
+ let modulePath = resolve_from_1.default.silent(fspath, pkgName);
+ if (modulePath !== void 0) {
+ try {
+ return requireFunc(modulePath);
+ }
+ catch (e) {
+ if (!options.silent) {
+ errorHandler_1.addToOutput(`Failed to load require ${pkgName} from ${modulePath}.${options.ignoreBundled ? `` : ` Using bundled`}`, 'Error');
+ }
+ }
+ }
+ return options.ignoreBundled ? null : requireFunc(pkgName);
+}
+exports.requireLocalPkg = requireLocalPkg;
+//# sourceMappingURL=requirePkg.js.map
\ No newline at end of file