In the modern JavaScript/TypeScript ecosystem, we frequently encounter "forks" or "lightweight alternatives" of popular libraries:
- Package A (
heavy-canvas): Feature-rich, covers 100% of edge cases, but large footprint. - Package B (
lightweight-canvas): Covers 80% of common use cases, highly optimized, small footprint.
Currently, if Package C depends on heavy-canvas, a consumer cannot automatically benefit from lightweight-canvas without resorting to manual bundler aliases (vite.config.js, webpack.config.js) or npm package aliasing (npm:package-a@...).