@module-federation/webpack-bundler-runtime
TypeScript icon, indicating that this package has built-in type declarations

0.13.0 • Public • Published

@module-federation/webpack-bundler-runtime

  • Extract the build runtime and combine it with the internal runtime
  • Used with webpack/rspack

Usage

The package needs to be used with webpack/rspack bundler. It will export federation object which includes runtime, instance, bundlerRuntime, initOptions, attachShareScopeMap, bundlerRuntimeOptions.

After referencing, mount it to the corresponding bundler runtime, and then use the corresponding api/instance.

  • example
import federation from '@module-federation/webpack-bundler-runtime';

__webpack_require__.federation = federation;

__webpack_require__.f.remotes = __webpack_require__.federation.remotes(options);
__webpack_require__.f.consumes = __webpack_require__.federation.remotes(options);

Package Sidebar

Install

npm i @module-federation/webpack-bundler-runtime

Weekly Downloads

2,273,017

Version

0.13.0

License

MIT

Unpacked Size

42.7 kB

Total Files

22

Last publish

Collaborators

  • zackljackson
  • heal
  • valorkin
  • zackarychapple
  • ilteoood
  • shawzhou
  • gioboa