0no-co / wonka

🎩 A tiny but capable push & pull stream library for TypeScript and Flow
MIT License
709 stars 29 forks source link

sourcing `./src/Wonka.bs.js` #110

Closed idkjs closed 3 years ago

idkjs commented 3 years ago

I ran wonka from a snowpack generated project and got this random error that ./src/Wonka.bs.js could not be sourced.

Screen Shot 2021-02-27 at 7 08 36 PM

Reproduction: https://github.com/idkjs/wonka-snowpack

Any idea what is going on here?

Thank you, sir.

Having just seen #97, I am on node v14.15.4

> sw_vers
ProductName:    macOS
ProductVersion: 11.2
BuildVersion:   20D64
> node -v
v14.15.4
>
kitten commented 3 years ago

It sounds like you have a Reason project on Snowpack and it's picking up the exports entry. Generally in Node this is enough to make that work: https://github.com/kitten/wonka/blob/2e89f5cc94dfb7edb2064465b8706cfe3dc382ef/package.json#L18

But it seems that that's not enough for Snowpack. I can add an additional entry for this root file, but I'd note that it's a bit weird for Snowpack not to support this "wildcard-like escape hatch"

idkjs commented 3 years ago

Thanks for the response. Mentioned it to snowpack. Seems like the #97 patch works which is fine. Not a serious project. Just an FYI.