rollup-plugin-off-main-thread
rollup-plugin-off-main-thread copied to clipboard
Remove bloated and no longer required string.prototype.matchall dependency
The string.prototype.matchall dependency to implement String.prototype.matchAll() in Node v10 was added because "The Workbox project [...] need to continue support Node v10 until our next major release version" (see #49).
workbox-build is now on version 7.0.0 and has a minimum supported Node version of v16.
String.prototype.matchAll() is available in Node since v12 according to MDN.
The dependency tree of string.prototype.matchall is bloated, so i would like to have it removed as the polyfill is no longer required by the most recent workbox-build version.
Dependency tree of string.prototype.matchall:
This screenshot is from an internal tool to analyze the package-lock.json file.
Dependencies starting from the second level below string.prototype.matchall are collapsed for better readability.
Removing no longer required dependency string.prototype.matchall would save users of this package from installing a lot of packages.
I agree with @ulrichstark, and would be glad to trim the extra dependencies — I've opened a PR:
- https://github.com/surma/rollup-plugin-off-main-thread/pull/60