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