Skip to content

refactor(virtual-module): move searchIndex to rsbuild-plugin-virtual-module#2487

Merged
SoonIter merged 3 commits intomainfrom
syt/virtual-module-re
Aug 18, 2025
Merged

refactor(virtual-module): move searchIndex to rsbuild-plugin-virtual-module#2487
SoonIter merged 3 commits intomainfrom
syt/virtual-module-re

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Aug 18, 2025

Summary

refactor: move searchIndex to rsbuild-plugin-virtual-module

Related Issue

#2217
#2273

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 18, 2025 11:17
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 18, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 99d24d1
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/68a30f52648b31000839435e
😎 Deploy Preview https://deploy-preview-2487--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title refactor: move searchIndex to rsbuild-plugin-virtual-module refactor(virtual-module): move searchIndex to rsbuild-plugin-virtual-module Aug 18, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts file 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.

Comment thread packages/core/src/node/runtimeModule/siteData/rsbuildPlugin.ts Outdated
Comment thread packages/core/src/node/initRsbuild.ts
@SoonIter SoonIter requested a review from Timeless0911 August 18, 2025 11:37
@SoonIter SoonIter enabled auto-merge (squash) August 18, 2025 11:44
@SoonIter SoonIter merged commit 2eec8cc into main Aug 18, 2025
8 of 9 checks passed
@SoonIter SoonIter deleted the syt/virtual-module-re branch August 18, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants