emosheeep / vite-plugin-virtual-mpa

Out-of-box MPA plugin for Vite, generate multiple entries using only one template.
https://stackblitz.com/~/github.com/emosheeep/vite-plugin-virtual-mpa
MIT License
120 stars 15 forks source link

HTML fallback not working with "root" option #50

Closed renataogarcia closed 1 year ago

renataogarcia commented 1 year ago

When using 'root' option in the config the html fallback won't find the page, unless the 'root' folder is included in the URL.

{
...
root: "src",
}

URL: http://localhost/test/index.html => Doesn't work

http://localhost/src/test/index.html => Works fine!

I've patched locally this line and got it working by path.resolve and the config.root.

emosheeep commented 1 year ago

🤔It seems you're right, but I'm not free now because I have to work, you could file an PR to fix it if you're in emergency.