-
Notifications
You must be signed in to change notification settings - Fork 710
Labels
Description
What problem does this feature solve?
Passing the -d option to Rolldown with no value seems to default to the current working directory, which can be dangerous when --clean-dir is enabled - very sneaky behavior when cleanDir is enabled in rolldown.config.js.
I suggest that this option should strictly require a value. If one really intends to use the current directory as the output dir, it could be done via -d . or perhaps -d "".
I managed to wipe a few uncommitted changes today after passing the -d option by mistake. I realize the error is mine, but I do think it'd be safer with the strict requirement. Thank you for considering!
What does the proposed API look like?
$ rolldown... builds accordingly torolldown.config.jsor by default into./dist$ rolldown -d .... builds into current directory$ rolldown -d... throws an error- same behavior when used in the long form:
--dir
Reactions are currently unavailable