text: const HtmlWebpackPlugin = require('html-webpack-plugin');
  const { ModuleFederationPlugin } = require("webpack").container;
  const deps = require('./package.json').dependencies;
  const path = require('path');
  
  module.exports = {
    entry: './src/index',
    cache: false,
  
    mode: 'development',
    devtool: 'source-map',
    devServer: {
      contentBase: path.join(__dirname, "dist"),
      port: 3002,
    },
    optimization: {
      minimize: false,
    },
  
    output: {
      publicPath: 'http://localhost:3002/',
    },
  
    module: {
      rules: [
        {
          test: /\.jsx?$/,
          loader: require.resolve('babel-loader'),
          exclude: /node_modules/,
          options: {
            presets: [require.resolve('@babel/preset-react')],
          },
        },
      ],
    },
  
    plugins: [
      new ModuleFederationPlugin({
        name: 'app2',
        filename: 'remoteEntry.js',
        exposes: {
          './RemoteApp': './src/RemoteApp',
        },
        shared: {
          ...deps,
          react: {
            singleton: true,
          },
          'react-dom': {
            singleton: true,
          },
        },
      }),
      new HtmlWebpackPlugin({
        template: './public/index.html',
      }),
    ],
  };
  