RemoteSubAppOptions: {
    exposes?: Record<string, string>;
    filename?: string;
    name: string;
    shared?: Record<string, ModuleShareOptions>;
    subAppsToExpose?: string[];
}

Options for exposing or consuming remote subapps using webpack5 ModuleFederationPlugin

See docs at https://webpack.js.org/concepts/module-federation/

Type declaration

  • Optional exposes?: Record<string, string>

    Directly specify exposes config according to webpack5 ModuleFederationPlugin options.

    See https://webpack.js.org/concepts/module-federation/

  • Optional filename?: string

    Name the remote entry JS file

    If it's not specified, then one is generated like this:

    _remote_~.${name}.js

    Where name is the original name after replacing invalid chars with _.

  • name: string

    Name of the remote entry.

    The name must only contain characters valid for a JavaScript variable name (identifier), which are _$0-9A-Za-z, and it can't start with numbers.

    Invalid characters are automatically replaced with _.

    We add __remote_ to the beginning if you expose some modules.

  • Optional shared?: Record<string, ModuleShareOptions>

    Specify share modules according to webpack5 ModuleFederationPlugin options

    See https://webpack.js.org/concepts/module-federation/

    Remark

    • If any modules is exposed remotely, then the option eager can't be true. So it will be set to false, otherwise it will be set to true.
  • Optional subAppsToExpose?: string[]

    Name of the subapps to expose

    Each subapp will be exposed remotely and available as './Name'

    • For example, the subapp 'Deal' would be exposed as a module './Deal'