string
>= 1.0.0
Specify the project root directory. Can be an absolute path, or a path relative to process.cwd()
.
The value of Rsbuild root
is also be passed to the context configuration of Rspack.
The value of root
does not affect the path of the .env
file, as the .env
file is resolved before the Rsbuild configuration file.
Rsbuild CLI supports using the --root
option to specify the root directory, which can affect the path of the .env
file. See "CLI" for more details.