const { withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack');

const config = withModuleFederationPlugin({
  name: 'sdk_custom_component_ai',
  filename: 'remoteModuleEntry.js',
  exposes: {
    './Main': './src/main.ts',
  },
  shared: {},
  sharedMappings: [],
});

config.resolve.alias.lodash = 'lodash-es';
config.output.uniqueName = 'sdk_custom_component_ai';
config.optimization.splitChunks = {
  ...config.optimization.splitChunks,
  chunks: 'all'
};

module.exports = config;
