"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const cli_core_1 = require("@bluebase/cli-core");
const webpack_merge_1 = __importDefault(require("webpack-merge"));
// tslint:disable-next-line:no-var-requires
const Jarvis = require('webpack-jarvis');
const removeNil = cli_core_1.Utils.removeNil;
/**
 * Add jarvis dashboard
 * @param config
 * @param builder
 */
const JarvisMiddleware = () => (config, builder) => {
    return webpack_merge_1.default(config, {
        plugins: removeNil([
            builder.ifDevClient(() => new Jarvis({
                port: 1338 // optional: set a port
            })),
        ]),
    });
};
exports.default = JarvisMiddleware;
//# sourceMappingURL=Jarvis.js.map