andywer / andywer/threads.js

Parcel 2 compatibility

Offen
#319 13 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
3.5k
Forks
173
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I've been scratching my head about how to build compatible workers, and this library is the most promising so far! Unfortunately, I use Parcel 2, and the basic demo runs into an error. 😢

auth.bd78dd40.js:1 Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL './index.d6afe8b1.js' is invalid.
at http://localhost:1234/auth.bd78dd40.js:1:1
at blob:http://localhost:1234/13b36260-4ae6-4c43-845c-0dfccc529f9c:1:1

I thought I found a reference suggesting that you can't use this kind of relative path from a blob, but Parcel 2 can definitely handle workers in general (e.g. libraries like `comlink` work with `parcel server`). However, I can't seem to find that again.

I'd really like to use `threads.js`, but this is a big blocker for our use case. Any thoughts on where best to attempt to address this?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.