You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a duplication of socket.io-client library when you pass socket.io-client instance to the plugin.
So if you use it this way, you probably have extra ~70kb of useless data in your build.
The only way to fix it is to force library user to pass socket.io-client instance always.
Advantages:
less build size with custom socket.io-client (e.g. ~70Kb)
no force version of socket.io-client for user
no need to support socket.io-client inside the library (update library just because socket.io-client updated)
user can pass any library compatible with socket.io-client, for example, socket.io-client/dist/socket.io.slim.js which is ~8kb smaller than socket.io-client but drops IE6-8
Disadvantages:
little harder to setup
The text was updated successfully, but these errors were encountered:
I've made investigation today using vue cli, and that's what I got:
There is a duplication of
socket.io-client
library when you passsocket.io-client
instance to the plugin.So if you use it this way, you probably have extra
~70kb
of useless data in your build.The only way to fix it is to force library user to pass
socket.io-client
instance always.Advantages:
socket.io-client
(e.g.~70Kb
)socket.io-client
for usersocket.io-client
inside the library (update library just becausesocket.io-client
updated)socket.io-client
, for example,socket.io-client/dist/socket.io.slim.js
which is ~8kb smaller thansocket.io-client
but drops IE6-8Disadvantages:
The text was updated successfully, but these errors were encountered: