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
I'm trying to use this library inside of a Vue project with Vite, however, peer connections get instantly closed in that setup. I also had to add @esbuild-plugins/node-globals-polyfill and events packages in order to get P2PT to work in Vite at all, so perhaps it could be related to that. If I include P2PT using a <script> tag in the same setup it works without a problem.
I have created the following reproduction projects on Stackblitz:
I've also tried something similar on a WebPack project and had the same issue as with Vite, although I did not try to isolate it in a reproducible project. I suspect this issue might occur with other bundlers as well.
The text was updated successfully, but these errors were encountered:
I'm trying to use this library inside of a Vue project with Vite, however, peer connections get instantly closed in that setup. I also had to add
@esbuild-plugins/node-globals-polyfill
andevents
packages in order to get P2PT to work in Vite at all, so perhaps it could be related to that. If I include P2PT using a<script>
tag in the same setup it works without a problem.I have created the following reproduction projects on Stackblitz:
If you open the
import
project in 2 separate tabs, you will see something along these lines:As you can see, the
peerclose
event is fired right after the tracker connection is established, wherepeerconnect
is expected instead.If you open the
script
project, where the only difference is the way P2PT is imported, you will see something along these lines:I've also tried something similar on a WebPack project and had the same issue as with Vite, although I did not try to isolate it in a reproducible project. I suspect this issue might occur with other bundlers as well.
The text was updated successfully, but these errors were encountered: