just-scripts
Version:
Just Stack Scripts
18 lines • 640 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.findWebpackConfig = void 0;
const just_task_1 = require("just-task");
const path = require("path");
function findWebpackConfig(...targets) {
for (const target of targets) {
const haystackConfigPaths = [target, target.replace(/\.js$/, '.ts')];
for (const needle of haystackConfigPaths) {
if (needle && just_task_1.resolveCwd(path.join('.', needle))) {
return needle;
}
}
}
return null;
}
exports.findWebpackConfig = findWebpackConfig;
//# sourceMappingURL=findWebpackConfig.js.map