Core: require explicit import for new search clients

This commit is contained in:
Fuma Nama
2026-03-08 22:18:18 +08:00
parent 418f4757a7
commit ddb0f81a98
3 changed files with 6 additions and 11 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-core': patch
---
require explicit import for new search clients
+1 -2
View File
@@ -317,7 +317,6 @@ export function Writing({
}
export function AgnosticBackground() {
const { resolvedTheme } = useTheme();
const ref = useRef<HTMLDivElement>(null);
const visible = useIsVisible(ref);
@@ -328,7 +327,7 @@ export function AgnosticBackground() {
>
<Dithering
colorBack="#00000000"
colorFront={resolvedTheme === 'dark' ? '#fc7744' : '#c6bb58'}
colorFront="#c6bb58"
shape="warp"
type="4x4"
speed={visible ? 0.4 : 0}
-9
View File
@@ -143,15 +143,6 @@ export function useDocsSearch(
client = oramaStaticClient(clientRest);
break;
}
case 'flexsearch-static': {
const res = (promiseMap[clientRest.type] ??=
import('./client/flexsearch-static')) as Promise<
typeof import('./client/flexsearch-static')
>;
const { flexsearchStaticClient } = use(res);
client = flexsearchStaticClient(clientRest);
break;
}
default:
throw new Error('unknown search client');
}