Vite support
rquanx opened this issue · 4 comments
rquanx commented
How can i add this proxy into Vite
koltyakov commented
Had no idea what is Vite. Looks like Next.js but for Vue.
Please check this. You need to route /_api
to sp-rest-proxy
server.
Please note, this is only for the dev, not prod runtime.
rquanx commented
I tried to write a plugin for Vite and started it in the buildStart hook, but there was a problem that Vite would restart the server after the modification and the proxy would be created repeatedly to generate listen EADDRINUSE
error.I added the judgment of whether the port is free, but if I save it quickly modify the file,There will still throw exceptions.
rquanx commented
publish rollup-plugin-sp-rest-proxy for dev