I have been using colyseus very well for a long time in Cocos Creator by importing dist/colyseus.js in my project. But recently when I updated it, both server and client, the client gave me error:
Uncaught TypeError: Colyseus.Client is not a constructor
And my code is the same with offical document:
import * as Colyseus from "colyseus.js";
var client = new Colyseus.Client('ws://localhost:2657');
I checked file dist/colyseus.js and found it has changed a lot, which is seemed to be compiled and in just one line. The change ID is c4063f63ebfc4aadf39254d611ae8c81406ac203.
I want to use consent argument in sever side for callback onLeave() so I have to update it.
Can anyone help me? Thanks very much!