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
116 stars 15 forks source link

Support for disabling rewrites #44

Closed renataogarcia closed 1 year ago

renataogarcia commented 1 year ago

I'm using the plugin and don't require the rewrites, however I'm proxying /api and the default rewrite ends up rewriting it. I can workaround it by writing a bypass rewrite as: rewrites: [{from: /.*/, to: ({parsedUrl, request}) => request.url}],

but would be nice to be able to do something like: rewrites: false

emosheeep commented 1 year ago

It sounds like a reasonable feature, I'll implement it when I'm free, also you could file a PR if you're in emergency.

emosheeep commented 1 year ago

The latest version 1.9.0 has supported this feature.

renataogarcia commented 1 year ago

Thanks! It works like a charm!