https://github.com/qiwi/module-federation-manifest-plugin
Webpack plugin to generate manifest about module federation: shared, exposed, remote modules
https://github.com/qiwi/module-federation-manifest-plugin
federation ui webpack
Last synced: 5 days ago
JSON representation
Webpack plugin to generate manifest about module federation: shared, exposed, remote modules
- Host: GitHub
- URL: https://github.com/qiwi/module-federation-manifest-plugin
- Owner: qiwi
- License: mit
- Created: 2022-11-22T05:47:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-20T23:53:35.000Z (2 months ago)
- Last Synced: 2025-04-14T14:07:21.136Z (18 days ago)
- Topics: federation, ui, webpack
- Language: TypeScript
- Homepage:
- Size: 713 KB
- Stars: 1
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# module-federation-manifest-plugin
[](https://github.com/qiwi/module-federation-manifest-plugin/actions/workflows/ci.yaml)
[](https://codeclimate.com/github/qiwi/module-federation-manifest-plugin/maintainability)
[](https://codeclimate.com/github/qiwi/module-federation-manifest-plugin/test_coverage)
[](https://www.npmjs.com/package/@qiwi/module-federation-manifest-plugin)> Webpack plugin to generate manifest about module federation: shared, exposed, remote modules
### Install
```bash
yarn add -D @qiwi/module-federation-manifest-plugin
npm i -D @qiwi/module-federation-manifest-plugin
```### Usage
Add plugin to webpack config. This plugin works together with `ModuleFederationPlugin`. In case of usage without it error will be raised
```typescript
import webpack from 'webpack'
import path from 'path'
import { ModuleFederationManifestPlugin } from '@qiwi/module-federation-manifest-plugin'export const config: webpack.Configuration = {
plugins: [
new webpack.container.ModuleFederationPlugin({
/** Your options here */
}),
new ModuleFederationManifestPlugin({
filename: 'manifest.json',
}),
],
}
```## Manifest schema
You can find schema description [here](https://github.com/qiwi/module-federation-manifest-plugin/blob/main/src/main/ts/schema.ts) and real examples in [tests](https://github.com/qiwi/module-federation-manifest-plugin/blob/main/src/test/ts/e2e.spec.ts)
## API
### Hooks
#### onManifestCreated
Invokes after manifest created, but not emitted
```javascript
compiler.hooks.compilation.tap('MyPlugin', (compilation) => {
ModuleFederationManifestPlugin.getHooks(compilation).onManifestCreated.tap('MyPlugin', (manifest) => {
console.log(manifest)
})
})
```## License
[MIT](./LICENSE)