fuzzysort icon indicating copy to clipboard operation
fuzzysort copied to clipboard

Deno/ESM support

Open prettykool opened this issue 2 years ago • 7 comments

This is gonna be a quick one: I'm using Deno (version 1.19.2), and couldn't import the fuzzysort.js file as a module. One quick hack with the file (and by that, I mean I removed the UMD function, and added an export const fuzzysort declaration ) later, and it looked like the problem was (somewhat) resolved.

Of course, the hack I did was complete crap - But it could be a step in the right direction. Is proper support for ESM imports a possibility? Or is there something I'm missing, here?

prettykool avatar Mar 09 '22 21:03 prettykool

That is what I had to do too to get it loading using plain import. Remove UMD-wrapper and do export const fuzzysort = fuzzysortNew(); Don't think it's "crap", it's standard., but agree should be possible to get it to handle both UMD and import somehow I think.

blq avatar Mar 10 '22 09:03 blq

Yes please! A build like ... at fuse.js .... to target different module patterns would be nice. Otherwise just go for esm? As this is and will be the way to go anyway on any js runtime.

blynx avatar Jul 13 '22 12:07 blynx