Closed rquanx closed 3 years ago
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.
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.
normal
quick edit
publish rollup-plugin-sp-rest-proxy for dev
How can i add this proxy into Vite