@module-federation/webpack-bundler-runtime
Module Federation Runtime for webpack
Last updated 2 years ago by zackljackson .
MIT · Original npm · Tarball · package.json
$ npm install @module-federation/webpack-bundler-runtime 
SYNC missed versions from official npm registry.

@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);

Current Tags

1249 Versions

Downloads
Total 876
Today 3
This Week 14
This Month 385
Last Day 5
Last Week 205
Last Month 454
Dependencies (2)
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE