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.


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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Let’s try CDKTF (with Python)

Next Post

Introducing Holopin: the digital badge platform for developers!

Related Posts