Reproduction link or steps
I created a repository that reproduces the bug. Please refer to the code in that repository.
repro-rolldown-chunk-bug
This repository uses bun and tsdown. If you determine that this is an issue with another library (rolldown or tsdown) rather than the dts plugin, please let me know and I will open an issue in that repository.
Describe the bug
I'm generating a single bundle file together with dts. However, chunks are only created when dts is enabled.
A virtual entry is being added via emitFile, and it seems rolldown recognizes it as multiple entries. Because of this, __defProp and __exportAll appear to be extracted into a separate chunk. For now I'm fixing it using plugin, but I don't think this is the correct approach.
System Info
System:
OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 5.78 GB / 15.15 GB
Container: Yes
Shell: 5.9 - /home/linuxbrew/.linuxbrew/bin/zsh
Binaries:
Node: 24.13.0 - /run/user/1000/fnm_multishells/1766_1772249235393/bin/node
npm: 11.6.2 - /run/user/1000/fnm_multishells/1766_1772249235393/bin/npm
pnpm: 10.28.2 - /home/phi/.local/share/pnpm/pnpm
bun: 1.3.10 - /home/phi/.bun/bin/bun
Browsers:
Chrome: 142.0.7444.59
Validations
Contributions
Compensating engineering work will speed up resolution and support the project
Reproduction link or steps
I created a repository that reproduces the bug. Please refer to the code in that repository.
repro-rolldown-chunk-bug
This repository uses bun and tsdown. If you determine that this is an issue with another library (rolldown or tsdown) rather than the dts plugin, please let me know and I will open an issue in that repository.
Describe the bug
I'm generating a single bundle file together with dts. However, chunks are only created when dts is enabled.
A virtual entry is being added via
emitFile, and it seems rolldown recognizes it as multiple entries. Because of this,__defPropand__exportAllappear to be extracted into a separate chunk. For now I'm fixing it using plugin, but I don't think this is the correct approach.System Info
System: OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat) CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor Memory: 5.78 GB / 15.15 GB Container: Yes Shell: 5.9 - /home/linuxbrew/.linuxbrew/bin/zsh Binaries: Node: 24.13.0 - /run/user/1000/fnm_multishells/1766_1772249235393/bin/node npm: 11.6.2 - /run/user/1000/fnm_multishells/1766_1772249235393/bin/npm pnpm: 10.28.2 - /home/phi/.local/share/pnpm/pnpm bun: 1.3.10 - /home/phi/.bun/bin/bun Browsers: Chrome: 142.0.7444.59Validations
Contributions
Compensating engineering work will speed up resolution and support the project