Problem or enhancement idea
mod-flexsearch v4's lazyLoad option (added in gethinode/mod-flexsearch@caaa1fb) defaults to false so that the introducing release is non-breaking. The performance win is significant — one ~542-page Hinode site went from a 6.45 MB core bundle to 149 KB — and the lazy path is the right default for most sites. A future major release should flip the default.
Proposed solution
In the next planned major release of mod-flexsearch:
- Change the default in
config.toml from lazyLoad = false to lazyLoad = true.
- Document the CSP requirement and the layout-override note prominently in the release notes / CHANGELOG.
- Consider removing the eager path entirely to reduce template complexity. (Alternatively, keep the toggle so sites can opt back to eager.)
Alternatives
Keep lazyLoad opt-in indefinitely and rely on each site to enable it. Loses the win for sites that never opt in.
Additional context
This is a breaking change:
- A site with a strict hand-written Content Security Policy whose
connect-src lacks 'self' will silently break — the index fetch is blocked and search input focuses but never loads results. (Sites using mod-csp are covered: mod-flexsearch ships a csp block that auto-merges connect-src 'self'.)
- Sites that overrode
flexsearch.index.js or the search-input layouts in their own theme will not get the new wiring and may silently lose search.
- The empty
flexsearch-index.json artifact already lands on every Hinode site as of 98160ea + c624d12 (registered output format + outputs entry).
- Original lazy-load feature: gethinode/mod-flexsearch@caaa1fb.
Problem or enhancement idea
mod-flexsearchv4'slazyLoadoption (added in gethinode/mod-flexsearch@caaa1fb) defaults tofalseso that the introducing release is non-breaking. The performance win is significant — one ~542-page Hinode site went from a 6.45 MB core bundle to 149 KB — and the lazy path is the right default for most sites. A future major release should flip the default.Proposed solution
In the next planned major release of
mod-flexsearch:config.tomlfromlazyLoad = falsetolazyLoad = true.Alternatives
Keep
lazyLoadopt-in indefinitely and rely on each site to enable it. Loses the win for sites that never opt in.Additional context
This is a breaking change:
connect-srclacks'self'will silently break — the index fetch is blocked and search input focuses but never loads results. (Sites usingmod-cspare covered:mod-flexsearchships acspblock that auto-mergesconnect-src 'self'.)flexsearch.index.jsor the search-input layouts in their own theme will not get the new wiring and may silently lose search.flexsearch-index.jsonartifact already lands on every Hinode site as of 98160ea + c624d12 (registered output format + outputs entry).