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

0.7.6 • 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

1,098,834

Version

0.7.6

License

MIT

Unpacked Size

51.6 kB

Total Files

28

Last publish

Collaborators

  • heal
  • valorkin
  • zackarychapple
  • ilteoood
  • gioboa
  • ranshamay
  • zackljackson
  • tysonrm