I’m writing a CLI program in ReScript. I want to let users define a ReScript module that would change some behaviour of my program.
In JavaScript, I would let users set an option that defines a Node module, which I would then load with require()
or dynamic import.
In ReScript I can load the code by writing custom bindings for require() / import()
(if I figure out how to find/create the compiled .bs.js), but I wont be able to use it as a ReScript module.
Any ideas on how to make this work?