-
-
Notifications
You must be signed in to change notification settings - Fork 632
Closed
Labels
Description
Summary
The auto-registration feature requires manual wrapper components for transpiled languages like ReScript. Components compiled to .bs.js files cannot be directly auto-registered via the ror_components convention.
Current Workaround
Create JavaScript wrapper files in ror_components/:
// bundles/comments/rescript/ReScriptShow/ror_components/RescriptShow.jsx
import RescriptShow from '../ReScriptShow.bs.js';
export default RescriptShow;Proposal
-
Extended file extension support: Allow configuration of additional extensions for auto-registration (e.g.,
.bs.js,.res.js) -
Resolution alias: Support aliasing patterns in component discovery:
config.component_resolution = { '.bs.js' => :auto_register, '.res.js' => :auto_register }
-
Documentation: Add guidance for ReScript, TypeScript, and other transpiled component integration
Environment
- React on Rails v16.2.1
- ReScript v11+ (uses
.res.jsextension convention)
Reactions are currently unavailable