How to #include javascript library into cocos creator

@slackmoehrle please help me understand how to include this multiplayer js library into cocos creator . A similar question was asked here but the answer involved editing the source code of the library which am not comfortable with.

Thanks

1 Like

I haven’t tested myself but I believe you can add the JS to your script folder and then mark import as plugin. After that you can import it as module.

Please read the Manual before asking the forum: http://www.cocos2d-x.org/docs/creator/en/scripting/plugin-scripts.html

1 Like

See @jrosich response.

All the javasript libraries failed to import into cocos creator because “Reference error. Exports is not defined”