Using Webpack and Babel umd build, the library produces browser file for both browser and node environment.
Even stranger is that it emits this file multiple times at node build that also causes error for the process.
You can reproduce it by cloning this repo and running npm i.
Origin story
One of our dependencies had to update this library because of the missing duplex member in the request.
The library also became ESM that we tried to import into our library after which it did not work with Jest tests.
Now, there are attempts to build this dependency with our stack that you can see above in order to have Jest tests.
You should ask this question in the Webpack issue tracker instead. This is about Webpack, not Ky. We are just using the standard package.json exports config.
Summary
Using Webpack and Babel
umd
build, the library producesbrowser
file for both browser and node environment. Even stranger is that it emits this file multiple times at node build that also causes error for the process.You can reproduce it by cloning this repo and running
npm i
.Origin story
One of our dependencies had to update this library because of the missing
duplex
member in the request. The library also became ESM that we tried to import into our library after which it did not work with Jest tests. Now, there are attempts to build this dependency with our stack that you can see above in order to have Jest tests.