Skip to content

refactor: use Rspack's OutputFileSystem type directly#6512

Merged
chenjiahan merged 2 commits intomainfrom
output_fs_type_1105
Nov 6, 2025
Merged

refactor: use Rspack's OutputFileSystem type directly#6512
chenjiahan merged 2 commits intomainfrom
output_fs_type_1105

Conversation

@chenjiahan
Copy link
Member

Summary

Remove custom OutputFileSystem type definition and use Rspack's built-in type instead.

This simplifies the codebase by relying on the official type definitions provided by Rspack.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings November 5, 2025 13:26
@netlify
Copy link

netlify bot commented Nov 5, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit e3a33dc
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/690b513f0648ed000810d84b
😎 Deploy Preview https://deploy-preview-6512--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 70 (🟢 up 10 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

Copy link
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 type handling for OutputFileSystem by removing a custom type extension and using the native @rspack/core type directly. The custom OutputFileSystem type that extended Rspack.OutputFileSystem with an optional createReadStream method has been removed, and all references now use Rspack.OutputFileSystem from the rspack types.

  • Removed custom OutputFileSystem type definition that extended Rspack.OutputFileSystem
  • Updated all import statements to use Rspack.OutputFileSystem instead of the local type
  • Modified setupOutputFileSystem to return the native fs module as a fallback when no compiler has an output filesystem

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/server/assets-middleware/index.ts Removed custom OutputFileSystem type definition
packages/core/src/server/assets-middleware/setupOutputFileSystem.ts Changed return type to use @rspack/core OutputFileSystem and updated fallback to return native fs module
packages/core/src/server/assets-middleware/middleware.ts Updated parameter types to use Rspack.OutputFileSystem instead of local type
packages/core/src/server/assets-middleware/getFileFromUrl.ts Updated parameter types to use Rspack.OutputFileSystem instead of local type
packages/core/src/server/browserLogs.ts Removed unused import and updated type cast to use Rspack.OutputFileSystem

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 80ac499 into main Nov 6, 2025
11 checks passed
@chenjiahan chenjiahan deleted the output_fs_type_1105 branch November 6, 2025 03:12
@chenjiahan chenjiahan mentioned this pull request Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant