socket.io-client
socket.io-client copied to clipboard
Update install docs for v3, slim build missing
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'
}
The documentation was updated: https://socket.io/docs/v3/client-installation/
Basically:
-
socket.io-client/dist/socket.io.dev.js
=>socket.io-client/dist/socket.io.js
-
socket.io-client/dist/socket.io.slim.js
=>socket.io-client/dist/socket.io.min.js
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.