I am using Rescript 11 RC 4 and using Panda CSS for styling.
To create styles, I am using Panda’s CSS function that I imported via interop. I tried to create style using ReactDOM.Style.make and normal Object. And even compiled JS looks fine. But my style aren’t rendered.
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Css from "../../styled-system/css";
import * as Patterns from "../../styled-system/patterns";
function css(prim) {
return Css.css(prim);
}
function css1(prim) {
return Css.css(prim);
}
function cx(prim0, prim1) {
return Css.cx(prim0, prim1);
}
function flex(prim) {
return Patterns.flex(prim);
}
export {
css ,
css1 ,
cx ,
flex ,
}
/* ../../styled-system/css Not a pure module */
Bindings are generating wrappers that import panda modules indirectly instead of direct imports. Adding an importMap in panda.config.js can help, but bindings still need to be created for each component, function, or utility. I’m working on early-stage codegen support for PandaCSS with ReScript, which will rely on the panda.config.js/ts file. You can check a preview here: