feat(core): add ignore option for public directory copy in server plugin#7023
Conversation
Summary of ChangesHello @JSH-data, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
481e2fe to
6eb2af9
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a new ignore option for the server.publicDir configuration, allowing users to exclude specific files or directories from being copied to the output directory based on glob patterns. The implementation correctly integrates tinyglobby for pattern matching and includes necessary type definitions and a comprehensive E2E test case. The changes are well-structured and address the reported issue effectively.
There was a problem hiding this comment.
Pull request overview
This PR adds a new ignore option to the server.publicDir configuration, enabling pattern-based exclusion of files when copying from the public directory. This addresses issue #6337 by providing users with fine-grained control over which public files should be excluded from the build output.
Changes:
- Added
ignoreproperty toPublicDirOptionstype accepting glob patterns - Implemented filtering logic using
tinyglobbyto skip matched files during copy operations - Added default empty array for
ignorein config normalization - Created e2e test validating the ignore functionality
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/core/src/types/config.ts | Adds optional ignore property to PublicDirOptions type definition |
| packages/core/src/plugins/server.ts | Implements filtering logic to exclude files matching ignore patterns during public directory copy |
| packages/core/src/defaultConfig.ts | Sets default empty array for ignore option in config normalization |
| e2e/cases/server/public-dir/publicDir.test.ts | Adds test case verifying files matching ignore patterns are excluded from build output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6eb2af9 to
37ac70b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hello, could you please take a look at this PR? The CI does not seem to be working. Thank you for your time! |
|
Thank you for your contribution! I will take a look |
chenjiahan
left a comment
There was a problem hiding this comment.
LGTM 👍
By the way, I'm considering using CopyRspackPlugin to copy public files in Rsbuild v2, so I may change this option from ignore to globOptions.ignore in another PRs, see https://rspack.rs/plugins/rspack/copy-rspack-plugin#globoptions
Summary
This PR provides an enhancement addressing issue #6337
It adds a new
server. publicDir.ignoreoption that enables pattern-based exclusion of files from the public directory.Related Links
Checklist