Recently, we added support of NODE_PATH in module resolution (thanks to @purkhusid https://github.com/BuckleScript/bucklescript/pull/3701 ), so technically, the package manager does not have to be npm
.
If there are more people interested in this direction, I would be happy to push this forward
Proposal: make bs-platform work with opam or esy
bobzhang
#1
thangngoc89
#2
Yes. I do want bs-platform to work with esy. But there is already an issue on github with details information for esy support right?
ulrikstrid
#3
If esy
can add support for the NODE_PATH environment variable we are pretty close to something that could work. We also have to compile everything into the top-level lib
folder but that has been done before.
andreypopp
#4
But there is already an issue on github with details information for esy support right?
Yes, the issue is https://github.com/BuckleScript/bucklescript/issues/3276, the gist is (based on the current status of esy):
- Make bsb support resolving modules via pnp.
- Make bsb do not put artifacts into package source trees (so it won’t pollute the global cache)
- Model bsc as an esy package so esy can cache the build in its store. (this item isn’t strictly required but nice to have)
osener
#7
Would this pave the way for being able to install BuckleScript with opam and use it with Dune, as part of a bigger OCaml project? If yes, this is #1 on my wish list!