The Defintely Typed repository imports it like this:
import * as lunr from 'lunr';
However when using it like that in Stackblitz it errors with:
lunr is not a function
Thoughts? This is the Stackblitz:
The Defintely Typed repository imports it like this:
import * as lunr from 'lunr';
However when using it like that in Stackblitz it errors with:
lunr is not a function
Thoughts? This is the Stackblitz:
Definitely Typed is using an older version of lunr, so I tried a different import:
import lunr from "lunr", which throws an error sayingposting[field]isundefined(source code).I then noticed that the
"text"field being used in theBuilderwas not initialized in theindex. Addingthis.field("text")in theindexresulted in the page loading without errors.