refactor(virtual-module): move searchIndex to rsbuild-plugin-virtual-module#2487
Merged
refactor(virtual-module): move searchIndex to rsbuild-plugin-virtual-module#2487
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the search index functionality by moving it from a separate searchIndex.ts module to integrate it directly into the rsbuild-plugin-virtual-module system. This consolidates the search index generation and serving logic into the build pipeline.
- Removes the standalone
searchIndex.tsfile and its functions - Integrates search index generation into the site data creation flow
- Moves from file-based to in-memory search index handling during build
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
packages/core/src/node/searchIndex.ts |
Completely removed - contained search index writing and middleware |
packages/core/src/node/runtimeModule/siteData/rsbuildPlugin.ts |
New file implementing search index generation within rsbuild plugin |
packages/core/src/node/runtimeModule/siteData/createSiteData.ts |
Refactored to return search index data instead of writing files |
packages/core/src/node/runtimeModule/index.ts |
Removed - functionality moved to specific plugin files |
packages/core/src/node/initRsbuild.ts |
Updated to use new plugin structure and removed search middleware |
packages/core/src/node/dev.ts |
Removed writeSearchIndex call |
packages/core/src/node/build.ts |
Removed writeSearchIndex call |
packages/core/package.json |
Removed rspack-plugin-virtual-module dependency |
playwright.config.ts |
Removed fullyParallel: false setting |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Timeless0911
approved these changes
Aug 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refactor: move searchIndex to rsbuild-plugin-virtual-module
Related Issue
#2217
#2273
Checklist