pearofducks / rollup-plugin-dev

development server for rollup with additional logging and options
MIT License
61 stars 9 forks source link

WebSocket proxying support #13

Closed sultangaleev closed 3 years ago

sultangaleev commented 3 years ago

Is there any plans to add support for WebSocket proxying?

Something like this in config would be great:

dev: ({
  proxy: {
    '/api': [
       'wss://websocket-host',
       { wss: true }
    ],
  },
}),
pearofducks commented 3 years ago

You can drop in any Koa plugin via the extend option - this module supports Websockets.

Version 2 of this plugin is probably going to support WebSockets out of the box.

pearofducks commented 3 years ago

As of v2 there's better Websocket support - and this will continue to improve in step with the proxy plugin used.

Documentation here: https://github.com/fastify/fastify-http-proxy#websocket