"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const webpack_blocks_1 = require("webpack-blocks");
const micro_core_1 = require("@vtex/micro-core");
const web_1 = require("../utils/web");
const node_1 = require("./node");
class Build extends micro_core_1.BuildHook {
    constructor() {
        super(...arguments);
        this.getWebpackConfig = async (config, target) => {
            const blocks = target === 'web'
                ? await web_1.getWebConfig(this.project, target)
                : await node_1.getNodeConfig(this.project, target);
            return webpack_blocks_1.group([config, ...blocks]);
        };
    }
}
exports.default = Build;
