gridsome-plugin-flexsearch icon indicating copy to clipboard operation
gridsome-plugin-flexsearch copied to clipboard

Causes UnhandledPromiseRejectionWarning in @gridsome\source-filesystem

Open vsimko opened this issue 5 years ago • 3 comments

When flexsearch is enabled, it is not possible to edit markdown files and at the same time to see the content being hot-reloaded in the browser.

See this issue: https://github.com/gridsome/gridsome/issues/1223

vsimko avatar Nov 25 '20 22:11 vsimko

Any progress on this? Still cant manage to hot reaload content when i edit md files.

SupremeSalvatore avatar Feb 27 '21 15:02 SupremeSalvatore

Here is a dirty workaround which disables flexsearch in dev mode:

{
  use: "gridsome-plugin-flexsearch",
  options: {
    searchFields: ["title", "subtitle", "excerpt", "tags", "content"],
    collections: process.env.NODE_ENV === "development" ? [] : collections,
    // ...
  }
};

vsimko avatar Mar 01 '21 09:03 vsimko

Thanks for workaround @vsimko , like you mentioned its not happy solution since then you cant do flex search but in my case markdown is changed more often, so at least we can toggle it now.

SupremeSalvatore avatar Mar 01 '21 17:03 SupremeSalvatore