Compiler isn't finding .re files in folders under /src


#1

I have a bunch of files underneath /src in my Reason project, and wanted to create a new folder to keep a bunch of components I’m making, say /src/components/ .

Unfortunately, the compiler isn’t finding anything I’m putting under there. I get a “can’t find module” error when I try to reference things, and the .bs.js files aren’t getting generated. Any ideas? Is this a configuration issue?


#2

Looks like I have to explicitly specify all the folders in the sources option in bsconfig.json. There is a specific config option (https://bucklescript.github.io/bucklescript/docson/#build-schema.json) for subdirs:
[{"dir": "src", "subdirs": [...]}]


#3

subdirs: true to capture them all