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]: TypeError: compilation.namedChunkGroups is not iterable #7837

Closed
VitaliyGuzun opened this issue Sep 9, 2024 · 0 comments · Fixed by #7840
Closed

[Bug]: TypeError: compilation.namedChunkGroups is not iterable #7837

VitaliyGuzun opened this issue Sep 9, 2024 · 0 comments · Fixed by #7840
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@VitaliyGuzun
Copy link

System Info

System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 3.24 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.15.0 - ~/.volta/tools/image/node/20.15.0/bin/node
Yarn: 3.8.3 - ~/.volta/tools/image/yarn/3.8.3/bin/yarn
npm: 10.7.0 - ~/.volta/tools/image/node/20.15.0/bin/npm
pnpm: 9.9.0 - ~/.volta/bin/pnpm
Browsers:
Chrome: 128.0.6613.120
Safari: 17.6
npmPackages:
@rspack/cli: ^1.0.0 => 1.0.0
@rspack/core: ^1.0.0 => 1.0.0

Details

We are trying to iterate compilation.namedChunkGroups to generate a preload html file.
Docs says it is iterable but I get a TypeError while building

Reproduce link

https://github.com/VitaliyGuzun/iterate-namedChunkGroups/compare/main...iterate-namedChunkGroups

Reproduce Steps

  • Add an rspack plugin
  • Try to iterate through compilation.namedChunkGroups there
  • try to build pnpm run build
  • see an error [rspack-cli] [Error: × TypeError: compilation.namedChunkGroups is not iterable
@VitaliyGuzun VitaliyGuzun added bug Something isn't working pending triage The issue/PR is currently untouched. labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant