library
library configures the output library format of the Module Federation container, determining how the container is exposed to external consumers.
- Type:
LibraryOptions - Required: No
- Default:
undefined
type (required)
- Type:
LibraryType - Required: Yes
Specifies the output library type for the container. Common values:
name
- Type:
string | string[] | LibraryCustomUmdObject - Required: No
- Default:
undefined
The name of the library. For umd type, you can specify separate names for amd, commonjs, and the global variable.
export
- Type:
string | string[] - Required: No
- Default:
undefined
Specifies which export should be exposed as the library.
umdNamedDefine
- Type:
boolean - Required: No
- Default:
false
When type is 'umd', whether to name the AMD module (i.e. pass the module name into define()).
amdContainer
- Type:
string - Required: No
- Default:
undefined
Add a container prefix for define/require functions in the AMD module.
auxiliaryComment
- Type:
string | object - Required: No
- Default:
undefined
Add a comment in the UMD wrapper for each module format.
- Example