Closed xianminx closed 3 months ago
Interesting, @xianminx! Seems like it will be fixed by #420, right?
In the esm file, I had to replace
module.exports = {
Index,
MetricKind,
ScalarKind,
Matches,
BatchMatches,
exactSearch,
};
with
const usearch = {
Index,
MetricKind,
ScalarKind,
Matches,
BatchMatches,
exactSearch,
};
export default usearch;
@johnhorsema this seems better, than what we've merged into main-dev. If that's so, can you open a PR?
Describe the bug
My NodeJS project fails to run when
type
set tomodule
in package.json. The log shows it is caused by redundantmodule.exports
inusearch.js
file.Steps to reproduce
module
in package.json.usearch
inindex.js
node index.js
Expected behavior
I see
usearch.js
file supportsESM
andCommonJS
by writingmodule.exports
andexport
in the same file.module.exports
should not be included in ESM dist.USearch version
v2.11.1
Operating System
macOS
Hardware architecture
x86
Which interface are you using?
C++ implementation
Contact Details
No response
Are you open to being tagged as a contributor?
.git
history as a contributorIs there an existing issue for this?
Code of Conduct