A development proxy plugin for Rsbuild, mimicking Create React App proxy behavior.
It allows you to:
- Proxy all HTTP requests that are not handled by the dev server.
- Proxy custom WebSocket requests, while ignoring Vite HMR WS connections.
- Automatically fix Windows localhost loopback issues.
- Compatible with Rsbuild development servers.
Install:
npm add @plugin-cra-proxy/rsbuild -DAdd plugin to your rsbuild.config.ts:
// rsbuild.config.ts
import { pluginCraProxy } from "@plugin-cra-proxy/rsbuild";
export default {
plugins: [pluginCraProxy()],
};package.json:
{
"proxy": "http://localhost:4000"
}MIT.