xolvio / storybook-webpack-federation-plugin

Exposes all the components in your Storybook as Webpack 5 federated components.
MIT License
57 stars 5 forks source link

Should the plugin name be more general? #12

Open TillaTheHun0 opened 4 years ago

TillaTheHun0 commented 4 years ago

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:

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.

ScriptedAlchemy commented 4 years ago

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.