Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 27, 2022 08:31 am GMT

Vite Module Federation: yes, we can

Microservices nowadays is a well-known concept and maybe you are using it in your current company.
Do you know that now you can apply similar ideas on the Frontend?

With Module Federation you can load separately compiled and deployed code into a unique application. This particular task allows you to create a Microfrontend architecture.

Until recently, this task was only a Webpack feature, but now there is a plugin to support Module Federation inside Vite.

Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects. It's the de facto standard for new projects and framework starters.

To understand better the paradigm and the configurations I created a working example of a host that loads a remote application at runtime.

screenshot

This is a simple Microfrontend architecture with Svelte, you can find the code here

I hope this plugin can helps the Microfrontend adoption, thanks for your attention, bye

Special thanks to Manfred Steyer for his contribution in this plugin.


Original Link: https://dev.to/gioboa/vite-module-federation-yes-we-can-i0o

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To