---
title: "Comment by Nihir Singh on \"vite-plugin-single-spa:  Vite Projects Made single-spa Compatible with One Plug-In\" | Hashnode"
description: "This package as well as this entire blog is revolutionary and is a core piece in the development of the single-spa framework for Vite!"
url: "https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03"
---

[Discussion](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7)

Comment [vite-plugin-single-spa: Vite Projects Made single-spa Compatible with One Plug-In](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7)

[Nihir Singh](https://hashnode.com/@iAlwaysForceGitPush)

[Dec 1, 2023](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03)

This package as well as this entire blog is revolutionary and is a core piece in the development of the single-spa framework for Vite!

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose)

[Dec 1, 2023](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03#reply-656a31e89475ae5ae8b2cf1c)

Hello, Nihir. I am glad you find it useful. Indeed, when I started my journey there was little to nothing to start with. By now, `vite-plugin-single-spa` is in v0.5.2 supporting multiple exports, multiple parcel/micro-frontend instances and just today had a hotfix. Please drop by GitHub and give the project a star and a follow so you don't miss releases and other important information.

Cheers!

[Dorov Toni](https://hashnode.com/@toni444)

[Dec 7, 2023](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03#reply-65717cad14e4ac7e3bdbfc21)

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose)

Hello, thank you for the articles

I've created root-project (Vite + Vue) & app (Vite + React) based on your example, right now trying to configure second app using (Vite + Vue) as another project module for root-project In your example there 2 active applications on route /mifea (as we can see vite + vue & vite + react)

What I'm trying to achieve is to activate only one app (that is responsible for price page) on route /price (for example) And on route /admin activate project that's responsible for admin page

Would appreciate if you could provide some advice on how to achieve that behavior?

Basically on 1 route (/price) I want to see price-app On 2nd route (/admin) I want to see admin-app

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose)

[Dec 7, 2023](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03#reply-6571f06337f7fa8c1537cb53)

[Dorov Toni](https://hashnode.com/@toni444) Hello. There's nothing special you need to do for your scenario. Yours is just textbook scenario described by single-spa: Simply set the registration for each application to use different routes. That's it.

```
const spas = [
  {
    name: 'price',
    moduleName: '@myApp/price',
    activeWhen: '/price'
  },
  {
    name: 'admin',
    moduleName: '@myApp/admin',
    activeWhen: '/admin'
  }
];

spas.forEach( s => {
  registerApplication({
    name: s.name,
    app: () => import(/* @vite-ignore */ s.moduleName),
    activeWhen: s.activeWhen
  });
});
```

Just like that. Separate routes for each.

[Dorov Toni](https://hashnode.com/@toni444)

[Dec 12, 2023](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03#reply-65783beea7af0fb6a9fea133)

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose) Thank you :) also styles doesn't loaded

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose)

[Dec 12, 2023](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/656a2f3d9475ae5ae8b2bf03#reply-65787a80a7af0fb6a9018a9d)

[Dorov Toni](https://hashnode.com/@toni444) I have an entire article that explains what needs to be done to load the micro-frontend CSS. Go through it.

Having said that, `vite-plugin-single-spa` can do CSS injection for you.
