First off, great library! We're using it to do our "AI powered" docs search on tldraw.dev.
Some of the code in this library depends on turndown, which in turn depends on sloppy.js. Certain "strict mode only" contexts, such as server-side routes on our Next.js app, will throw when this code and its sloppy with usage is present. To fix this, I've had to patch out the exports of the WebFetcher and other items in the module's index.js file.
I'm not sure what the right fix is here, however you could consider separate export entry points, i.e. import { WebFetcher } from "vectra/WebFetcher" so that the extra exports are not pulled in when importing from vectra alone?
First off, great library! We're using it to do our "AI powered" docs search on tldraw.dev.
Some of the code in this library depends on
turndown, which in turn depends onsloppy.js. Certain "strict mode only" contexts, such as server-side routes on our Next.js app, will throw when this code and its sloppywithusage is present. To fix this, I've had to patch out the exports of the WebFetcher and other items in the module'sindex.jsfile.I'm not sure what the right fix is here, however you could consider separate export entry points, i.e.
import { WebFetcher } from "vectra/WebFetcher"so that the extra exports are not pulled in when importing fromvectraalone?