@@ -79,7 +79,7 @@ const clonedRemarkLinkRewrite = remarkLinkRewrite.bind(null)
79
79
type CompileMdxOptions = Pick <
80
80
LoaderOptions ,
81
81
| 'staticImage'
82
- | 'flexsearch '
82
+ | 'search '
83
83
| 'defaultShowCopyCode'
84
84
| 'readingTime'
85
85
| 'latex'
@@ -97,7 +97,7 @@ export async function compileMdx(
97
97
source : string ,
98
98
{
99
99
staticImage,
100
- flexsearch ,
100
+ search ,
101
101
readingTime,
102
102
latex,
103
103
codeHighlight,
@@ -116,16 +116,16 @@ export async function compileMdx(
116
116
let searchIndexKey : string | null = null
117
117
if ( ERROR_ROUTES . has ( route ) ) {
118
118
/* skip */
119
- } else if ( typeof flexsearch === 'object' ) {
120
- if ( flexsearch . indexKey ) {
121
- searchIndexKey = flexsearch . indexKey ( filePath , route , locale )
119
+ } else if ( typeof search === 'object' ) {
120
+ if ( search . indexKey ) {
121
+ searchIndexKey = search . indexKey ( filePath , route , locale )
122
122
if ( searchIndexKey === '' ) {
123
123
searchIndexKey = locale || DEFAULT_LOCALE
124
124
}
125
125
} else {
126
126
searchIndexKey = locale || DEFAULT_LOCALE
127
127
}
128
- } else if ( flexsearch ) {
128
+ } else if ( search ) {
129
129
searchIndexKey = locale || DEFAULT_LOCALE
130
130
}
131
131
@@ -218,7 +218,7 @@ export async function compileMdx(
218
218
remarkCustomHeadingId ,
219
219
[ remarkHeadings , { isRemoteContent } ] satisfies Pluggable ,
220
220
// structurize should be before remarkHeadings because we attach #id attribute to heading node
221
- flexsearch && ( [ remarkStructurize , flexsearch ] satisfies Pluggable ) ,
221
+ search && ( [ remarkStructurize , search ] satisfies Pluggable ) ,
222
222
staticImage && remarkStaticImage ,
223
223
readingTime && remarkReadingTime ,
224
224
latex && remarkMath ,
0 commit comments