Re:Breaking Up with Long Tasks or: how I learned to group lo...
by adregan on Saturday January 04, 2025 @09:49AM
(#42594981)
The library use case is trickier, but bundlers do a pretty good job of handling workers (albeit with funky magic comments in webpack’s case).
What I find a pain is the uneven support for shared workers.
It works in principle, but note that this really complicates your build process. In particular, if you're writing a library that other people will use as a dependency, there's really no good way to use workers at all without affecting how people bundle their code using your library.