webpack.js.org icon indicating copy to clipboard operation
webpack.js.org copied to clipboard

Webpack Module Federation Docs

Open RyanCCollins opened this issue 4 years ago • 6 comments

Feature request

My company is evaluating micro-frontend frameworks for a platform. Webpack is high up on the list of potential frameworks, but unfortunately, the webpack module federation docs are not up to the standard of the more stable webpack docs.

What is the expected behavior?

  • The docs for module federation are missing API Docs containing explanation of the properties on the ModuleFederationPlugin and low-level container plugins.
    • It's not clear how shared modules, exposes and remotes work. The only way to figure it out is to dig into the examples.
    • Not clear what overrides vs. overridables are and how they relate to the plugin.
    • A deeper dive into shared modules, including their optional properties, would be helpful.
    • Other properties should be documented to show their intent and data type.

What is motivation or use case for adding/changing the behavior? Making Webpack module federation adoptable

How should this be implemented in your opinion? Similar to the other webpack API docs

Are you willing to work on this yourself? no, I don't have the required knowledge or the time unfortunately. If someone with the knowledge would provide me with details, I can submit a PR.

RyanCCollins avatar Dec 08 '20 15:12 RyanCCollins

For maintainers only:

  • [ ] webpack-4
  • [x] webpack-5
  • [ ] bug
  • [ ] critical-bug
  • [ ] enhancement
  • [x] documentation
  • [ ] performance
  • [ ] dependencies
  • [ ] question

webpack-bot avatar Dec 08 '20 15:12 webpack-bot

After digging into Module Federation codebase, I realized that https://webpack.js.org/concepts/module-federation/ is presenting outdated information.

With this PR https://github.com/webpack/webpack/pull/10960, OverridablesPlugin got replaced with SharePlugin. That means Overriding, OverridablesPlugin, Dynamic Remote Containers sections contain invalid information.

estevaolucas avatar Dec 22 '20 21:12 estevaolucas

Facing the same issue. As of now we are using examples to understand the API, a proper documentation of API is very important.

jayankmayukh avatar Feb 22 '21 10:02 jayankmayukh

Yes same here, there is very little documentation for ModuleFederationPlugin itself and its configuration.

tmkasun avatar Apr 30 '21 14:04 tmkasun

for me, I got lost trying to figure out how to use the OverridablesPlugin (https://webpack.js.org/concepts/module-federation/#building-blocks) only to find out it was removed in https://github.com/webpack/webpack/pull/10960

edit: sorry, this is the same issue reported 3 comments up.

tetchel avatar May 18 '21 15:05 tetchel

I think this is also supposed to be covered under https://github.com/webpack/webpack.js.org/issues/3757

tetchel avatar May 18 '21 16:05 tetchel