Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Ability to exclude files from printFileSize plugin #4041

Open
mogelbrod opened this issue Nov 22, 2024 · 1 comment
Open

[Feature]: Ability to exclude files from printFileSize plugin #4041

mogelbrod opened this issue Nov 22, 2024 · 1 comment
Assignees

Comments

@mogelbrod
Copy link

What problem does this feature solve?

Our rsbuild configuration outputs a large number of files, including many images of varying file sizes. This causes the arguably more interesting JS/CSS assets to be lost in the long list. It would be great if it was possible to provide a filtering function that allow users to exclude items from the printed list. The printed total size would ideally only sum the printed (included) files as well.

What does the proposed API look like?

Suggested API:

{
  performance: {
    printFileSize: {
      include: (filePath) => /\.(js|css)\b/.test(filePath)
    }
  }
}
@chenjiahan
Copy link
Member

LGTM, Rsbuild will provide this option in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants