In npm I can install package foo
into devDependencies
and list it in peerDependencies
so that the user must install foo
alongside my library in their package.json.
How is this done with rescript packages?
My package has peer dependencies on two ReScript packages: @rescript/react
and rescript-webapi
.
The classic JS approach works for rescript-webapi
, but for @rescript/react
I get errors.
Here’s the repro: https://github.com/tom-sherman/rescript-react-peer-dependency-issue
Steps to reproduce:
cd dependency
npm link
cd ../consumer
npm i
npm link dependency
npm start
Expected:
Built package.
Actual:
FAILED: src/Dependency.cmj
We've found a bug for you!
~/dependency/src/Dependency.res:2:19-21
1 │ @react.component
2 │ let make = () => <div> {"Hello"->React.string} </div>
3 │
The value div can't be found
FAILED: cannot make progress due to previous errors.