storybook-webpack-federation-plugin icon indicating copy to clipboard operation
storybook-webpack-federation-plugin copied to clipboard

Should the plugin name be more general?

Open TillaTheHun0 opened this issue 4 years ago • 1 comments

The name of this plugin, and apis, suggest that this plugin can only be used with Storybook. However, this plugin can be used outside the scope of Storybook. In fact, it can be used with any webpack config (see https://github.com/TillaTheHun0/webpack5-playground/pull/2 for examples).

Using a StorybookWebpackFederationPlugin in a project without Storybook seems like it could be confusing for folks. Should the plugin name be changed to reflect its wider use cases (all webpack configs)?

Fundamentally, what this plugin does is "scan" for components, using globs. Some suggestions:

  • GlobWebpackFederationPlugin
  • ScanWebpackFederationPlugin

Some of the APIs would need to change to move away from Storybook vernacular.

I think this plugin would see more adoption if the name reflected its wider use cases.

TillaTheHun0 avatar May 16 '20 03:05 TillaTheHun0

The official naming convention for WP4 federation backports is WP4 Federation Shim, so it might be good to disclose as suck in some manner - I’ve not looked at the code but about to - and likely this uses a shim like system that I’ve designed to recreate the federation compatibility later.

ScriptedAlchemy avatar May 17 '20 08:05 ScriptedAlchemy