Reproduction link or steps
Here's a repro with the instructions -
https://github.com/brijeshb42/rolldown-treeshake-repro
Stackblitz for the same - https://stackblitz.com/~/github.com/brijeshb42/rolldown-treeshake-repro
This is just the minimal reproduction. I have been setting up tsdown to be used on https://github.com/mui/mui-x but the bundle size increase is significant for it to be considered right now.
What is expected?
Rolldown output should be correctly tree-shakeable when used through vite.
What is actually happening?
It is including extra unused code when rolldown's output code is bundled through vite. I have tested using vite only but this may be true for other bundlers as well.
System Info
System:
OS: macOS 26.2
CPU: (14) arm64 Apple M3 Max
Memory: 314.36 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.10.0 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/node
Yarn: 1.22.22 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/yarn
npm: 11.6.2 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/npm
pnpm: 10.27.0 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/pnpm
bun: 1.2.17 - /Users/brijesh/.bun/bin/bun
Browsers:
Brave Browser: 143.1.85.120
Firefox: 146.0.1
Safari: 26.2
npmPackages:
rolldown: ^1.0.0-beta.59 => 1.0.0-beta.59
Any additional comments?
Is there a way to tell rolldown to preserve the export * as-is instead of converting/resolving all the exports and passing it through __exportAll ?
Reproduction link or steps
Here's a repro with the instructions -
https://github.com/brijeshb42/rolldown-treeshake-repro
Stackblitz for the same - https://stackblitz.com/~/github.com/brijeshb42/rolldown-treeshake-repro
This is just the minimal reproduction. I have been setting up tsdown to be used on https://github.com/mui/mui-x but the bundle size increase is significant for it to be considered right now.
What is expected?
Rolldown output should be correctly tree-shakeable when used through vite.
What is actually happening?
It is including extra unused code when rolldown's output code is bundled through vite. I have tested using vite only but this may be true for other bundlers as well.
System Info
System: OS: macOS 26.2 CPU: (14) arm64 Apple M3 Max Memory: 314.36 MB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.10.0 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/node Yarn: 1.22.22 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/yarn npm: 11.6.2 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/npm pnpm: 10.27.0 - /Users/brijesh/.nvm/versions/node/v24.10.0/bin/pnpm bun: 1.2.17 - /Users/brijesh/.bun/bin/bun Browsers: Brave Browser: 143.1.85.120 Firefox: 146.0.1 Safari: 26.2 npmPackages: rolldown: ^1.0.0-beta.59 => 1.0.0-beta.59Any additional comments?
Is there a way to tell rolldown to preserve the
export *as-is instead of converting/resolving all the exports and passing it through__exportAll?