IxJS icon indicating copy to clipboard operation
IxJS copied to clipboard

ES modules do not work

Open ukstv opened this issue 2 years ago • 1 comments

Pals, the project is awesome. Yet, despite all the effort dedicated to packaging, one can not use it in Node16, from ES modules.

First, you do not use conditional exports to specify import paths like ix/asynciterable or ix/asynciterable/operators.

Second, the JS code which is supposed to conform to ES modules format uses extension-less imports. For example, in ix-esnext-esm/asynciterable/index.js one could find a line like export * from './batch'; It should be export * from './batch.js'; for Node to parse it.

Let me know if I can help with moving this to pure ESM. Now it sucks, and it is a great disappointment for me. I am willing to volunteer here.

ukstv avatar Apr 21 '22 15:04 ukstv

Yeah, the node ESM stuff has changed (again) since we last updated the packaging. I think we've finally got it all working in Arrow, I just haven't back-ported the changes to the IxJS build system yet.

I wrote the IxJS and Arrow build scripts around the same time and intended to support the same things, so they are very similar. Now just have to port the Arrow updates back here, but haven't had time.

trxcllnt avatar Apr 25 '22 19:04 trxcllnt