MilanKovacic / single-spa-vite

Experimental repository of single-spa using Vite, without SystemJS
MIT License
21 stars 1 forks source link

single-spa-vite

This is an experimental repository of single-spa using Vite without any dependency on SystemJS. It showcases the potential of Microfrontend architecture using single-spa and Vite.

Features

Project Structure

The project structure is as follows:

single-spa-vite
├── microfrontend
├── root-config

The microfrontend is a single-spa micro-frontend application which is bundled and served by Vite. This application will operate under the umbrella of the global 'root-config' application.

The root-config is a root-config single-spa application that initializes and mounts the micro-frontend application.

Prerequisites

Before you begin, ensure you have met the following requirements:

Running the Example

  1. Navigate into folders microfrontend, microfrontend2 and root-config
cd microfrontend
npm install
npm run dev
cd microfrontend2
npm install
npm run dev

Then,

cd ../root-config
npm install
npm run dev
  1. Open your browser and visit http://localhost:3005

The microfrontend app bundled by Vite without SystemJS should now be running! Enjoy.