sockjs/sockjs-client — pull request #184 by gobengo (2014-06-26 03:00:17+00:00)
Title: Make browserifiable

Kudos for switching to browserify for the 1.x release! I have been using it myself for the past couple weeks, and having a great time compared to RequireJS or alternatives.

However, sockjs-client is not, itself, usable as a dependency in a browserified project. Browserify can't figure out the entrypoint of the repo (because package.json#main is missing).

Also, the ./lib/utils module expects `SockJS` to be defined, but does not explicitly require it.

This pull request fixes these two issues. I've verified that after this patch, I can browserify require('sockjs-client') in another project and start connecting to a backend.

Great project!