My JSX-based but not React framework has one large direct dependency (RxJS), but still comes in less than react-dom and comparable to preact:
https://bundlephobia.com/package/[email protected]
Similarly, I have to keep remembering that when trying to argue for web component embedding that it isn't competing with just lit, but generally lit and lit-html together:
https://bundlephobia.com/package/[email protected] https://bundlephobia.com/package/[email protected]
I wonder if bundlephobia needs more of "peer dependency" mode.
In the case of lit, I think lit-html actually is a direct dependency of lit (unless I'm reading it wrong)? In the composition section at the bottom of lit's Bundlephobia page it says lit-hmtl makes up 46.1% of lit's bundle size.
The one thing you do have to remember about lit though is that if you're server side rendering you'll also need the @webcomponents/template-shadowroot polyfill, and @lit-labs/ssr-client/lit-element-hydrate-support.js [2].
I agree that Bundlephobia needs a peer dependencies mode. It still might be tough to be exhaustive about these things because react-dom depends on react as a peer, but confusingly the reverse is not true, because even though almost everyone is using react with react-dom, you could technically render to a different target (e.g. Ink uses react to render terminal UIs). Bundlephobia would need to be aware of packages that are so commonly used together that they're de facto peer dependencies, even if they're not de jure peer dependencies.
The author even mentions Solid, so presumably he's aware that there are other frameworks utilizing JSX.
[1] https://bundlephobia.com/package/[email protected]
[2] https://bundlephobia.com/package/[email protected]