Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ const siteConfig: Config = {
repoUrl: 'https://github.com/reduxjs/react-redux',
},
themes: [require.resolve('@getcanary/docusaurus-theme-search-pagefind')],
headTags: [
{
// Rspack (`future.v4.fasterByDefault`) bundles the dynamic
// `import(path ?? '/pagefind/pagefind.js')` inside @getcanary/web's
// pagefind provider instead of leaving it as a browser import, so it fails
// at runtime with MODULE_NOT_FOUND and search shows no results. The
// provider uses `window.pagefind` when present, so load the module here.
tagName: 'script',
attributes: { type: 'module' },
innerHTML: `import('/pagefind/pagefind.js').then(m => { window.pagefind = m }).catch(() => {})`,
},
],
themeConfig: {
tableOfContents: {
minHeadingLevel: 2,
Expand Down
Loading