In late 2020, support for prefixes was added to the bot-side functionality. See here
We are, however, missing support for it in the browser-side.
https://github.com/PrismarineJS/prismarine-viewer/blob/master/lib/index.js#L10
It should be as simple as adding an object to the io() function like:
const socket = io({
path: customPrefix ? `${customPrefix}/socket.io/` : '/socket.io/'
}
Question is how do you want to implement this, as from what I see is that the browser doesn't pull any server options.
SocketIO Client Docs