-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Front End modularization How to achieve? #1
Comments
Please let me know if you have any suggestion~ |
Fucking great!If the template engine is used, how to extend the page like hook in WordPress? |
To make your app extensible, an extension registration framework is needed. You could take a look at my another project skr, wihch provides skeleton of auth/security/extension registration. This project is in kinds of incubation state right now, but it also has been used in some of our production projects. |
好的 |
I use extjs but extjs is commercial 😁😁 |
Webpack 5 module federation might be the key. Will take a close look at it. |
@hank-cp Can Webpack 5 module federation combine pf4j to achieve modular development and extension points? |
No. module federation is totally web technology that nothing relates to pf4j, which is totally server side technoalogy. If it helps, it will be another sbp-vue-client or sbp-angular-client or sbp-reactjs-client project to manage front end modularization specifically. |
Actually, Module Federation works with anything that uses the JavaScript environment runtime. Right now I’ve federated middleware across servers, my GraphQL layer uses module federation against 6 independently deployed systems. Not sure of the context of this project, but as the creator of Module Federation, I know what will do. If you’ve got questions, I’m happy to discuss. What is the need here and use case for this project? |
Maybe this kind of library may also be worth taking a look: remote-component or remote-module-loader ? |
That solution still is more complex than module federation. Which is built into webpack itself. It's designed to let you import from other bundles deployed on different URLs, client or server - module federation supports this. You simply import remote components like you would anything else. https://github.com/module-federation/module-federation-examples/tree/master/server-side-render-only Module federation also works on projects like next js, though the server implementation in v9 requires a workaround. V10 will support it out the box. SSR and all. Just sayin, what you want is built-in to webpack and works as expected in production for the past 6 months 🤷♂️ |
Hi, But maybe I missed something ? |
Dynamic remotes are supported and I've used them in several ways. In the module federation examples repo, there's a dynamic remote sample doing just that. Remotes can also be nested and circular without problem |
You're probably referring to this feature : dynamic-remote-containers ? |
Hi, In the provided example, I have three plugins that each contribute a widget URL to an extension point. The widget is provided as a JS component (in this case, it's a Material UI Card) and the given URLs are loaded by the application's UI. |
Front End modularization How to achieve?
The text was updated successfully, but these errors were encountered: