"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs-extra"));
function getConfigCreator(configPath) {
    if (!fs.existsSync(configPath)) {
        throw new Error(`Cannot not find webpack config file "${configPath}"`);
    }
    const creator = require(configPath);
    if (typeof creator !== 'function') {
        throw new Error(`webpack config "${configPath}" must export a function as default value`);
    }
    return creator;
}
exports.getConfigCreator = getConfigCreator;
//# sourceMappingURL=utils.js.map