skypackjs / skypack-cdn

An issue tracker for the CDN
107 stars 5 forks source link

primus-client #141

Open PlkMarudny opened 3 years ago

PlkMarudny commented 3 years ago

Hi, it looks like primus-client package is a manual rewrite of the primus-client.js generated by the running Primus server, thus no customization (plugins, transports) is possible and the version supplied is behind the current Primus release. Is there any solution to that?

drwpow commented 3 years ago

I can’t say I’m too familiar with Primus / Primus client, but I do see that https://cdn.skypack.dev/primus-client seems to load. What is your question, exactly? I’m afraid I’m not really understanding.

PlkMarudny commented 3 years ago

primus-client loads, that's ok, but this is just a very basic client; primus-client is dynamically generated based on primus options included in the server (so primus-client ok Skypack does not include support for any plugins, for example). It should also match the server version used. The solution I used at the end was generating primus-client from my version of the server, transforming it using rollup (this works just fine) and importing it from the local .js file.