You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resolve bare .rx specifiers through node_modules so libraries can ship .rx source #83
Resolve bare .rx specifiers through node_modules, so that a component library can ship .rx source and consumers import it like any other .rx module:
import { Button } from "@acme/ui/button.rx"
Today
A JS package can already ship a .d.rx beside the file its import resolves to (MO-10c, package_declaration in compiler/src/modules.rs). An .rx import, though, is always joined to the importer's directory (join_path, modules.rs:31). A bare specifier like the one above becomes <importer dir>/@acme/ui/button.rx and fails with MODULE_NOT_FOUND.
Why it matters
Solid component libraries increasingly publish source (.tsx, StyleX source) and let the consumer's compiler build it, rather than shipping dist plus .d.ts. .rx is a natural fit for this, because the consumer's checker then sees the library's real signatures (MO-9), not a hand-written .d.rx. It also matches how @solidjs/vite-plugin already treats .rx as source in the bundle.
Suggested behaviour:
Resolve the way MO-10c already does: walk node_modules upward from the importer, then use exports, then module/main.
An exports target ending in .rx is then an .rx module, checked and lowered as part of the importing program.
A module shared by several programs stays one module, keyed by its factory (CP-4b module).
Happy to test a branch against a real design system.
Activity