You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the build it yourself philosophy of this library, I made my own lib of callbags.
Just a package.json with the dependencies I need and an index.js exporting them like the one in this project.
However I noticed callbag-flatten failed to work, because the new version doesn't export the function like the rest of the callbags. Now it needs to be flatten: require('callbag-flatten').default,
instead of the previous flatten: require('callbag-flatten')
I wonder, shouldn't all calbags export the same way?
The text was updated successfully, but these errors were encountered:
Confirming this is an issue. callbag-flatten is not CommonJS but a module, which means the correct export is, as @jorbuedo pointed out, called default.
Importing flatten from the current version of callbag-basics results in importing a module, rather than the function.
Webpack behaves closer to spec and fails, but when compiled with esbuild this works. So your milage may vary. But it should be corrected, either here, or upstream in callbag-flatten.
Recommended workaround is to use callbag-flatten installed directly.
Following the build it yourself philosophy of this library, I made my own lib of callbags.
Just a package.json with the dependencies I need and an index.js exporting them like the one in this project.
However I noticed callbag-flatten failed to work, because the new version doesn't export the function like the rest of the callbags. Now it needs to be
flatten: require('callbag-flatten').default,
instead of the previous
flatten: require('callbag-flatten')
I wonder, shouldn't all calbags export the same way?
The text was updated successfully, but these errors were encountered: