Skip to content

sw1tch3roo/single-spa-vite-host

Repository files navigation

single-spa-vite-host

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.

🧠 Why Vite + Single SPA?

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

🔧 Features

  • ⚙️ Dynamic importmap loading for micro-frontend registration
  • 🧩 Modular, minimal boilerplate for building custom container apps
  • 🪶 No complex config or legacy tooling — clean and production-ready

🤝 Compatibility

This host app is fully compatible with the single-spa-vite-microfrontend service repository. Use them together to build complete working Single SPA systems.

📥 Getting Started

git clone https://github.com/sw1tch3roo/single-spa-vite-host.git
cd single-spa-vite-host
pnpm i
pnpm preview

About

Single SPA micro‑frontend host built with Vite – example implementation and starter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published