User defined module to open in every module


Is there a way to have a module opened in every other module automatically like Pervasives?


I remember seeing this somewhere but have forgotten. I believe @alexfedoseev knows because he mentioned something on discord about updating bsconfig.json to do this very thing.


There is but it’a a bit awkward since it’s not possible to open local module globally.

You have to move module(s) you want to open globally to stand-alone package w/ own package.json & bsconfig.json (I use yarn workspaces for it). Then add this package as a dependency and then open it via bsconfig.json:

"bs-dependencies": ["foo"],
"bsc-flags": ["-open Foo"],