@module-federation/manifest
Version:
Provide manifest/stats for webpack/rspack MF project .
35 lines (24 loc) • 796 B
Markdown
This package contains the manifest plugin for webpack/rspack internal.
```sh
npm install @module-federation/manifest
```
1. replace expose options with container.options.exposes = containerManager.containerPluginExposesOptions;
```js
import { ContainerManager } from '@module-federation/managers';
const containerManager = new ContainerManager();
containerManager.init(options);
// it will set expose name automatically
options.exposes = containerManager.containerPluginExposesOptions;
```
2. use StatsPlugin in webpack.config.js
```js
import { StatsPlugin } from '@module-federation/manifest';
new StatsPlugin(mfOptions, {
pluginVersion: pkg.version,
bundler: 'webpack',
}).apply(compiler);
```