I have a Next.js documentation site at https://logary.tech source, and would like to implement the document search, e.g. with Lunr.
How do I program babel/webpack/nextjs to also extract text (perhaps as a pre-compilation step/babel plugin), into a json file, that I can use for input to Lunr?