@qiwi/module-federation-manifest-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

module-federation-manifest-plugin

CI Maintainability Test Coverage npm (tag)

Webpack plugin to generate manifest about module federation: shared, exposed, remote modules

Install

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

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 and real examples in tests

API

Hooks

onManifestCreated

Invokes after manifest created, but not emitted

compiler.hooks.compilation.tap('MyPlugin', (compilation) => {
  ModuleFederationManifestPlugin.getHooks(compilation).onManifestCreated.tap('MyPlugin', (manifest) => {
    console.log(manifest)
  })
})

License

MIT

Package Sidebar

Install

npm i @qiwi/module-federation-manifest-plugin

Weekly Downloads

19

Version

1.1.2

License

MIT

Unpacked Size

97 kB

Total Files

77

Last publish

Collaborators

  • antongolub
  • qiwibot