text: const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
  const mf = require("@angular-architects/module-federation/webpack");
  const path = require("path");
  const share = mf.share;
  
  const sharedMappings = new mf.SharedMappings();
  sharedMappings.register(
    path.join(__dirname, '../../tsconfig.json'),
    [/* mapped paths to share */]);
  
  module.exports = {
    output: {
      uniqueName: "mfe1",
      publicPath: "auto"
    },
    optimization: {
      runtimeChunk: false
    },   
    resolve: {
      alias: {
        ...sharedMappings.getAliases(),
      }
    },
    plugins: [
      new ModuleFederationPlugin({
        
          // For remotes (please adjust)
          name: "mfe1",
          filename: "remoteEntry.js",
          exposes: {
              './SomeModule': './projects/mfe1/src/app/some/some.module.ts',
          },        
          
          // For hosts (please adjust)
          // remotes: {
          //     "main": "main@http://localhost:4200/remoteEntry.js",
  
          // },
  
          shared: share({
            "@angular/core": { singleton: true, strictVersion: true, requiredVersion: 'auto' }, 
            "@angular/common": { singleton: true, strictVersion: true, requiredVersion: 'auto' }, 
            "@angular/common/http": { singleton: true, strictVersion: true, requiredVersion: 'auto' }, 
            "@angular/router": { singleton: true, strictVersion: true, requiredVersion: 'auto' },
  
            ...sharedMappings.getDescriptors()
          })
          
      }),
      sharedMappings.getPlugin()
    ],
  };
  