socketio / socket.io

Realtime application framework (Node.JS server)
https://socket.io
MIT License
60.9k stars 10.09k forks source link

Update install docs for v3, slim build missing #5105

Open hyperknot opened 3 years ago

hyperknot commented 3 years ago

The install docs have not been updated for v3. There is no slim build anymore, is it on purpose?

If so, which bundle do you recommend for development and which one for production? Or there isn't any differentiation anymore?

Before I had this in webpack aliases:

let socketioClient
if (process.env.NODE_ENV === 'development') {
  socketioClient = 'socket.io-client/dist/socket.io.dev.js'
} else {
  socketioClient = 'socket.io-client/dist/socket.io.slim.js'
}
darrachequesne commented 3 years ago

The documentation was updated: https://socket.io/docs/v3/client-installation/

Basically:

hyperknot commented 3 years ago

But with any recent Webpack setup (like recent create-react-app), basically there is no need to specify anything, right? You just import socket.io-client and everything will be set. So the whole custom alias setup I used for v2 can be removed.