./foo.js from my Reason code.
external declarations) got stripped completely, and the
import statement got moved directly into the file that was calling the wrapper library.
node_modules and can be reached from any file in the project without changing the import path. But when using relative imports, it doesn't work out so well.
The Reason Discord channel informed me that if the library includes an
.rei file, or a Reason interface file, the wrapping code won't be compiled away, and the relative import will stay in the file where it was defined, instead of getting moved to the call site.
There's another method, too, suggested in the Discord channel:
[%%bs.raw ] block at the top level of some Reason file. That will include all of the JS directly into the compiled output of that file, and the author won't need to worry about relative imports at all after that.