"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("./utils");
function getLibProdConfig(paths, bundleTypes) {
    const { libName, outputPath, rootPath, srcPath, modulesPath } = paths;
    const creator = utils_1.getConfigCreator(paths.webpackConfigMap.libProd);
    const entry = {};
    if (bundleTypes.includes('*')) {
        entry.main = paths.autoRequireTempPath;
        entry.meta = paths.autoRequireMetaTempPath;
    }
    if (bundleTypes.includes('h5')) {
        entry['main.h5'] = paths.autoRequireTempH5Path;
        entry['meta.h5'] = paths.autoRequireMetaTempH5Path;
    }
    if (bundleTypes.includes('pc')) {
        entry['main.pc'] = paths.autoRequireTempPCPath;
        entry['meta.pc'] = paths.autoRequireMetaTempPCPath;
    }
    const params = {
        libName,
        context: rootPath,
        entry,
        output: {
            path: outputPath,
            filename: `${libName}.[name].[hash].js`,
            library: `@impage-materials-[name]-${libName}`,
            libraryTarget: 'window',
            umdNamedDefine: true,
        },
        externals: {
            react: 'React',
            antd: 'Antd',
            'react-dom': 'ReactDom',
            'react-dom/server': 'ReactDomServer',
        },
        paths: {
            libSrcPath: srcPath,
            libModulesPath: modulesPath,
        },
        modules: [],
    };
    return creator(params);
}
exports.getLibProdConfig = getLibProdConfig;
//# sourceMappingURL=lib.prod.js.map