Declare solid-js as a peerDependency#1405
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds peer dependency declarations for Solid packages across three packages in the monorepo. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Okay so I'm not sure if I want solid-js as a peerDependency, but 100% bundling a second SolidJS runtime is not great. We currently build moq/watch with vite so it inlines solid; there should be no |
|
I didn't realise Solid was being inlined. Inlining means each package ships its own Solid runtime, so the components can't be rendered inside the consumer app's Solid tree, which is the problem affecting @moq/watch/ui, @moq/watch/ui, and @moq/ui-core because they export raw Solid components. One option is to mark solid-js as external in the Vite config across all packages; another is to do it only for the UI-focused ones (@moq/watch, @moq/publish, @moq/ui-core) and leave the ./element web-component entries alone but then u still have to import solid-js on your own. Worth noting: after building locally with solid-js externalised, dist/ui/index.js went from 48 KB → 26 KB — that delta is the size of the Solid runtime that was previously being carried inside each package. What do you think @kixelated? |
|
I don't really want to make solid an explicit dependency just for the UI web component. It hurts dev UX. TBH I kind of want to revert the switch to solidjs and go back to the minimal moq/signals DOM library, since it's already a dependency. Solid feels like overkill for a simple, stock video UI. And yeah ui-core is not supposed to be consumed by external users. |
|
Sounds good — happy to close. Just one thing for the record: on the supported Web Component path ( + in a Solid app, no direct /ui imports), the overlay buttons fire, but their visual state doesn't update (play icon stays on play after pausing). Reactive signals seem not to cross between the inlined Solid in @moq/watch/element and the one in @moq/watch/ui. Probably moot once you move off Solid, but at the moment it doesn't work properly. |
@moq/publish, @moq/watch, and @moq/ui-core import from solid-js and solid-js/web, but solid-js was only listed in devDependencies. Since common/package.ts strips devDependencies at release time, the published package.json files declared no solid-js at all, while their JS still contains bare import "solid-js" statements.
Consumers ended up with either an unresolved import or two Solid runtime instances loaded side-by-side. Because Solid's delegateEvents is a per-runtime singleton, UI components rendered by these packages registered click handlers on a different runtime than the one wired up to the host app, so buttons appeared inert.