algoliasearch-client-javascript provide cjs, es, but does not support deduping
kopax-polyconseil opened this issue · comments
Hello,
We had a memory leak while building our application, and we were able to solve it by increasing the memory for node, but while investigating, we noticed this anomaly:
It seems the UMD module gets builded with webpack, while I can see that you are distributing ES and CJS format.
In your documentation here it is written:
Both versions come as UMD and ESM modules.
Inspecting at your package.json, it seems you are not defining the module
, is it possible to release a version that fix the module as we rather not ship all of algoliasearch to our web clients.
Thanks in advance !
related issues
fix
We manage to fix it with webpack resolve.alias
This screenshots illustrate the potential gain of using CJS :
I used Webpack Bundle Analyzer to do this analyze.