/* eslint-disable @typescript-eslint/no-var-requires */
const merge = require("webpack-merge");
const { setupCommonConfig } = require("./common");
const commonClientConfig = require("./client");
const commonProdConfig = require("./commonProd");
const prodClientPlugins = require("./prodClientPlugins");

module.exports = env => {
    const commonConfig = setupCommonConfig(false, env);

    const clientConfig = merge(commonConfig, commonClientConfig, commonProdConfig, {
        entry: {
            public: "./modules/client-framework/Entry.ts",
        },
        plugins: prodClientPlugins(),
    });

    return clientConfig;
};
