Skip to content

[Bug]: CLI: --codeSplitting false is rejected as a string instead of being parsed as boolean #10125

Description

@e965

Reproduction link or steps

https://github.com/e965/rolldown-cli-repro-1
https://github.com/e965/rolldown-cli-repro-1/actions/runs/28687552017/job/85082891748

What is expected?

The CLI should correctly parse --codeSplitting false and --codeSplitting=false as a boolean false value, as documented in the CLI help output:

--codeSplitting <codeSplitting> Code splitting options (true, false, or object).

Running Rolldown with either of these commands should disable code splitting and produce a single output file, equivalent to the deprecated --inlineDynamicImports behavior:

rolldown src/index.js --codeSplitting false --format=esm --platform=node --minify --sourcemap --file=dist/index1.js
rolldown src/index.js --codeSplitting=false --format=esm --platform=node --minify --sourcemap --file=dist/index2.js

What is actually happening?

Both CLI forms fail because the value false is treated as a string instead of being parsed as a boolean:

[error] Invalid value for option codeSplitting: Invalid type: Expected (boolean | Object) but received "false".

This happens with both:

--codeSplitting false
--codeSplitting=false

However, the deprecated --inlineDynamicImports option still works and prints a warning suggesting codeSplitting: false instead:

[warn] `inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.

So there is currently no working CLI equivalent for disabling code splitting through the documented codeSplitting option.

System Info

System:
    OS: Linux 6.18 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.13.0 - /home/user/.nvm/versions/node/v24.13.0/bin/node
    npm: 11.12.1 - /home/user/.nvm/versions/node/v24.13.0/bin/npm
  npmPackages:
    rolldown: ^1.1.4 => 1.1.4

Any additional comments?

This may also happen with other CLI options that require a boolean argument, but I have not tested this.

Metadata

Metadata

Labels

wontfixThis will not be worked on

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions