ember.jswebsocketsocket.ioember-cli

How can I use the Socket.IO client though ES6 modules?


I am currently working with Ember.js using the Ember-CLI. The application uses ES6 modules to import the required functions to each "module".

I am going to use web sockets to connect to the API and I would like to find some examples of how to import socket.io as a ES6 module.


Solution

  • Try to app.import it in your Brocfile, then export default window.socketio