Remove build-step for Bit/ByteStreams once Modules support for Dedicated Workers is ubiqitous
codedread opened this issue · 4 comments
https://caniuse.com/mdn-api_worker_worker_ecmascript_modules
Chrome/Edge/Opera: Supported ES Modules in Dedicated Workers since Nov 2019
Webkit will support soon. Bug: https://bugs.webkit.org/show_bug.cgi?id=164860
Firefox showing signs of movement now. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1247687
The only browser left to implement ES6 module workers is Firefox.
The main Firefox bug was resolved in Jan 2022, but it is not shipping yet.
Is it time to try this feature out in Firefox nightly. about:config has dom.workers.modules.enabled set to true currently.
This is finished now in the es6-module-workers branch. I will merge this branch into main (and do a release) when Firefox ships ES6 module workers.
Also, the files unrar.js, rarvm.js, unzip.js, zip.js, untar.js should be rewritten as ES Modules too: https://github.com/codedread/bitjs/tree/master/archive
Firefox 111 has been released and it now supports Module Workers behind a flag : dom.workers.modules.enabled
This means that the feature is likely on a path to ubiquitous browser and NodeJS support. I think we can create a branch for pre-ES Module Workers, freeze the 1.0.x branch and then rewrite things to use Worker Modules and call that a 1.1.0 release...