Glench / fuzzyset.js

fuzzyset.js - A fuzzy string set for javascript
http://glench.github.io/fuzzyset.js/
Other
1.37k stars 105 forks source link

fuzzyset 1.0.6 and above not working when webpacked #55

Open fergiemcdowall opened 2 years ago

fergiemcdowall commented 2 years ago

Hi and thanks for a great lib!

I have found that fuzzyset@1.0.6 and above works great in vanilla node apps, but seems to stop working when webpacked. 1.0.5 works for me in both scenarios.

Glench commented 2 years ago

Can you please provide some steps to reproduce what you're seeing? And the latest version should be 1.0.7.

fergiemcdowall commented 2 years ago

Applies to 1.0.6 and above (so also 1.0.7)

Fuzzyset is used in one of the search-index tests. In this testsearch-index creates a dictionary from a corpus and then feeds that dictionary into fuzzyset

To replicate the problem:

  1. Clone search-index
  2. npm install
  3. run npm run test-node and npm run test-browser (tests pass 🎉)
  4. In package.json update fuzzyset to 1.0.7 (or 1.0.6)
  5. rm -rf node_modules && npm install
  6. Run npm run test-node (tests pass 🎉)
  7. Run npm run test-browser (same tests fail on fuzzyset)

This is not a super big issue for me, and I know that slogging through somebody elses webpack config is pretty time consuming, so its cool to just treat this as an "incident report" and only follow up on it if other users report the same behaviour.

Glench commented 2 years ago

Thanks for the report and replication steps!

To others viewing this thread, please comment here if you're also impacted by this issue.

ArmelChesnais commented 2 years ago

My team is impacted by this as well.

Glench commented 2 years ago

Please consider posting some of your config in a way that reproduces the issue.

nikodevv commented 2 years ago

Ran into this issue on webpack ^5.74.0. I started writing out our config but we quite a complicated monorepo set up, and I don't think I'll have the time to write it all out.