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

[Bug]: cacheGroups filename params with maxSize doesn't take effect #6440

Open
abettadapur opened this issue May 5, 2024 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@abettadapur
Copy link

abettadapur commented May 5, 2024

System Info

System: All
Version: RSPack 0.6.3

Details

I have the following cacheGroups configuration

  svg: {
          filename: 'svg-[contenthash].js',
          name: 'svg',
          chunks: 'all',
          maxSize: 100 * 1024,
          reuseExistingChunk: true,
          test: /.*\.svg/,
        },

With webpack, I get the following files

* svg-xxxxxx-yyyyyyy.js
* svg-aaaaaa-bbbbb.js
* ...

With RSPack, I get the following files

* svg-1.js
* svg-2.js
* ...
* svg-xxxxxx.js

I would expect [contentHash] to take effect here

Reproduce link

No response

Reproduce Steps

Add a cacheGroups entry, and set max size so multiple chunks are produced

See that [contentHash] is not respected

@abettadapur abettadapur added bug Something isn't working pending triage The issue/PR is currently untouched. labels May 5, 2024
@abettadapur
Copy link
Author

Actually, no part of the name configuration takes effect

EX:

  svg: {
          filename: 'svg-helloworld.js',
          name: 'svg',
          chunks: 'all',
          maxSize: 100 * 1024,
          reuseExistingChunk: true,
          test: /.*\.svg/,
        }

Produces

* svg-1.js
* svg-2.js
* ...
* svg-helloworld.js

@abettadapur abettadapur changed the title [Bug]: [contentHash] with maxSize doesn't take effect [Bug]: cacheGroups filename params with maxSize doesn't take effect May 5, 2024
@LingyuCoder LingyuCoder removed the pending triage The issue/PR is currently untouched. label May 6, 2024
@SyMind
Copy link
Member

SyMind commented May 31, 2024

I could not reproduce this issue. Please provide a minimal reproduction repository. @abettadapur

@abettadapur
Copy link
Author

Thanks for looking @SyMind .
I'm on vacation right now, but can provide you a repro next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants