-
-
Notifications
You must be signed in to change notification settings - Fork 618
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]: Webpack's output.clean supports the useful option to optionally keep some files around #7822
Comments
Welcome to close #7845 at any time, I may not have enough time to support it at the moment. |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Bump |
Sorry for the late reply, I've been busy on graduating recently, and I'm expected to be not vacant until late in March. /cc @shulaoda |
What problem does this feature solve?
Thank you for all the work y'all are doing on rspack! Not having to rethink all the frontend building configuration is really great.
Here's the documentation for the option:
https://webpack.js.org/configuration/output/#outputclean
I especially like using
clean: { keep: /\.html$/ }
to keep the generated HTML files around, so that different build or development processes do not delete each other's HTML files (generated by thehtml-webpack-plugin
).I could use different folders for each of them, but I thought it's worth submitting since it's a difference to webpack
What does the proposed API of configuration look like?
Webpack uses
boolean | { dry?: boolean, keep?: RegExp | string | ((filename: string) => boolean) }
according to the docs. A very useful, limited first step would beboolean | { keep?: RegExp }
. I don't think the other options are needed except for feature parity. dry-running shouldn't matter -- if you want to clean up, clean up. If you do not, then don't. I also don't know why you'd want to use a callable here.The text was updated successfully, but these errors were encountered: