I want use websocket to creat a long connection in the public js ,when the router changed,the long connection can keep and nerver disconnect.
So,I need a public js not the component.How can I do it?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c738">#c738</a>)</em></sub></div>