"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyBuilderBasicPlugin = void 0;
const constants_1 = require("../constants");
function applyBuilderBasicPlugin(api) {
    api.modifyBundlerChain((chain, { isProd, target }) => {
        chain.name(constants_1.TARGET_ID_MAP[target]);
        // The base directory for resolving entry points and loaders from the configuration.
        chain.context(api.context.rootPath);
        chain.mode(isProd ? 'production' : 'development');
        chain.merge({
            infrastructureLogging: {
                // Using `error` level to avoid `cache.PackFileCacheStrategy` logs
                level: 'error',
            },
        });
    });
}
exports.applyBuilderBasicPlugin = applyBuilderBasicPlugin;
