Skip to content

feat: add resourceQuery option for excluding by query#34

Merged
chenjiahan merged 2 commits into
mainfrom
resource_query_0507
May 7, 2025
Merged

feat: add resourceQuery option for excluding by query#34
chenjiahan merged 2 commits into
mainfrom
resource_query_0507

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

This PR introduces a new resourceQuery option, this allows users to exclude certain resources based on their query string.

For example, to exclude all resources with the raw query, such as import rawTs from './ReactComponent.ts?raw';, use the following:

new ReactRefreshPlugin({
  resourceQuery: { not: /raw/ },
});

Related: web-infra-dev/rsbuild#2665 (comment)

@chenjiahan chenjiahan requested review from 9aoy and LingyuCoder May 7, 2025 05:17
@chenjiahan chenjiahan merged commit d4f754c into main May 7, 2025
3 checks passed
@chenjiahan chenjiahan deleted the resource_query_0507 branch May 7, 2025 05:25
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.

2 participants