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

feat: support function type for splitChunks.{cacheGroup}.{test, name} #4722

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

bvanjoi
Copy link
Contributor

@bvanjoi bvanjoi commented Nov 20, 2023

Fixes #4376

Support the function type for optimize.splitChunks.{cacheGroup}.{name, test}

NOTE: This is an initial implementation and I do not guarantee that it will function correctly in all cases. If there are any questions or issues, please raise the corresponding issue.

@bvanjoi bvanjoi requested review from a team November 20, 2023 15:10
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Nov 20, 2023
@JSerFeng
Copy link
Contributor

!bench

@rspack-bot
Copy link

rspack-bot commented Nov 21, 2023

📝 Benchmark detail: Open

name base current %
10000_development-mode + exec 1.53 s ± 20 ms 1.52 s ± 15 ms -0.50%
10000_development-mode_hmr + exec 1.17 s ± 13 ms 950 ms ± 12 ms -18.62%
10000_production-mode + exec 2.98 s ± 66 ms 2.94 s ± 20 ms -1.47%
10000_production-mode_builtin-swc-loader + exec 3.75 s ± 57 ms 3.72 s ± 39 ms -0.66%
threejs_development-mode_10x + exec 2 s ± 22 ms 2 s ± 16 ms -0.04%
threejs_development-mode_10x_hmr + exec 1.46 s ± 6.8 ms 1.26 s ± 6.2 ms -14.24%
threejs_production-mode_10x + exec 6.08 s ± 31 ms 6.07 s ± 28 ms -0.29%
threejs_production-mode_builtin-swc-loader_10x + exec 7.37 s ± 100 ms 7.6 s ± 34 ms +3.04%

@JSerFeng JSerFeng added this pull request to the merge queue Nov 21, 2023
Merged via the queue into web-infra-dev:main with commit c413d02 Nov 21, 2023
14 checks passed
@pushkargupta9807
Copy link

hello @bvanjoi - can we also add the function type or regexp for splitChunks.{cacheGroup}. chunks ? like below in webpack
https://webpack.js.org/plugins/split-chunks-plugin/#splitchunkschunks

Thanks!

@bvanjoi
Copy link
Contributor Author

bvanjoi commented Dec 1, 2023

@pushkargupta9807 it would be better to open a new issue for this matter which will facilitate us in keeping track of this.

@pushkargupta9807
Copy link

@bvanjoi which respack version is the above fix available to try out ?

Also as per your suggestion, I submitted a new issue : #5188

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

function type support missing for critical splitChunks options
4 participants