algolia / algolia/algoliasearch-client-javascript

algoliasearch-client-javascript provide cjs, es, but does not support deduping

Open
#1,421 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.4k
Forks
226
PR merge metrics
No merged PRs in 30d

Description

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:

![image](https://user-images.githubusercontent.com/77674046/181224647-48f0b0fb-519f-4eea-ac8c-6639c49ba205.png)

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](https://www.algolia.com/doc/api-client/getting-started/install/javascript/?client=javascript#install-via-npm-recommended) 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

- https://github.com/bvaughn/react-error-boundary/issues/114

## fix

We manage to fix it with webpack resolve.alias

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.