Does anybody have a Cloudflare Tunnel working with rspack HMR yet?
If so could you please post your Cloudflare config and the devServer part of your rspack config?
I’ve been hammering on this for days and haven’t gotten it working yet.
In case anybody can just see from looking what’s wrong with my config, here it is:
Cloudflare Config
ingress:
# WebSocket routes (must come first due to path specificity)
- hostname: www.myDevDomain.com
path: /ws
service: ws://localhost:8080
- hostname: myDevDomain.com
path: /ws
service: ws://localhost:8080
- hostname: wss.myDevDomain.com
path: /ws
service: ws://localhost:8080
# HTTP routes
- hostname: myDevDomain.com
service: http://localhost:3000
- hostname: www.myDevDomain.com
service: http://localhost:3000
# Catch-all
- service: http_status:404
rspack Config
devServer: {
port: 8080,
host: '0.0.0.0',
allowedHosts: 'all',
hot: true,
client: {
overlay: true,
reconnect: 3,
webSocketURL: {
protocol: 'ws',
hostname: 'localhost',
port: 8080,
pathname: '/ws',
},
},
},