mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
af6a998066
A plain new Worker("./w.js") or navigator.serviceWorker.register("./sw.js")
resolves against the document base URL in a browser, and a Node
worker_threads string resolves against the working directory. Static
analysis was resolving browser strings against the calling script, which
recorded a resolved mapping to the wrong file.
Only new Worker(new URL(path, import.meta.url)) now produces a specifier.
Other worker and service-worker strings keep their expression and stay
unresolved, matching the existing worker_threads string handling.
Fixes #3309
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>