I want to add on to this.
I am also developing a plugin for JWebSockets.
I have the same problem.
When I minify the script during export, I get errors.
For example, one of the identifer was "usersList" and it was changed to "-"
At present I am developing the plugin so testing without minify is ok. But it will be a problem when I want to actually deploy it.