---
title: "Comment by Philip Hahn on \"vite-plugin-single-spa:  Vite Projects Made single-spa Compatible with One Plug-In\" | Hashnode"
description: "Hello José Pablo Ramírez Vargas . During my own journey with single-spa I came across your articles. Thank you for your work and effort to bring vite into singl"
url: "https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/6604193f20f34137f957e789"
---

[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)

[Philip Hahn](https://hashnode.com/@PDGallus)

[Mar 27, 2024](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/6604193f20f34137f957e789)

Hello [José Pablo Ramírez Vargas](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/@webJose). During my own journey with single-spa I came across your articles. Thank you for your work and effort to bring vite into single-spa.

In connection with the "standalone" version of the "mife", I stumbled upon a problem that I have not yet been able to solve. What would be the approach if you import a utility module in a "mife". The problem I have is that the import maps for the mife type cannot be set in the plugin and I have not yet figured out how to tell the mife to import this external dependency at runtime.

If I use Webpack, I can import the module manually afterwards using the button (bottom right by default).

Have I overlooked something obvious?

I would be very happy if someone would share their thoughts or suggestions with me. If I get this point solved, then I can switch everything to vite.

Happy Easter to all

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

[Mar 27, 2024](https://hashnode.com/posts/vite-plugin-single-spa-vite-projects-made-single-spa-compatible-with-one-plug-in/64cb2ff5fc7bd27cda4c77f7/comment/6604193f20f34137f957e789#reply-66044e4132a4b9a21c5622f2)

Hello, [Philip Hahn](https://hashnode.com/@PDGallus). In Vite, you set any module alias as an external so the build process won't try to bundle its code. This is not enough for Vite in serve mode (`npm run dev`) because serve mode doesn't bundle. What I do is make a small plug-in (really easy to do) that provides a fake module (or even a copy if that's what you need) when working with Vite in serve mode.

If you require further help, [open a discussion item here](https://github.com/WJSoftware/vite-plugin-single-spa/discussions/new?category=q-a) where we have more room to share information and code snippets around.
