Host application built with Vite for loading micro-frontends in Single SPA architecture
This project demonstrates a lightweight and modern approach to building a Single SPA host using Vite as a build tool. The application dynamically loads remote micro-frontends registered via importmap.
This was one of the first public implementations of a Single SPA host powered by Vite (instead of Webpack). I introduced this approach in early 2024 in my technical article on Habr, where I described the benefits and setup in detail.
Vite enables:
- Lightning-fast development and HMR
- Native ESM support for cleaner builds
- Simplified configuration vs Webpack
- Modern DX for micro-frontend architecture
- ⚙️ Dynamic
importmaploading for micro-frontend registration - 🧩 Modular, minimal boilerplate for building custom container apps
- 🪶 No complex config or legacy tooling — clean and production-ready
This host app is fully compatible with the single-spa-vite-microfrontend service repository. Use them together to build complete working Single SPA systems.
git clone https://github.com/sw1tch3roo/single-spa-vite-host.git
cd single-spa-vite-host
pnpm i
pnpm preview