@@ -14,7 +14,9 @@ async function buildAction(inputPath: string, options: any) {
1414 const { cwd, inputPath : parsedInputPath , config, output } = result ;
1515
1616 const resolvedCwd = path . resolve ( cwd ) ;
17- const inputPathResolved = path . resolve ( resolvedCwd , parsedInputPath ) ;
17+ const inputPathResolved = parsedInputPath
18+ ? path . resolve ( resolvedCwd , parsedInputPath )
19+ : undefined ;
1820 const outputPathResolved = path . resolve ( resolvedCwd , output ) ;
1921 const configPathResolved = path . resolve ( resolvedCwd , config ) ;
2022
@@ -28,7 +30,7 @@ async function buildAction(inputPath: string, options: any) {
2830 configPath : doesConfigPathExist ? configPathResolved : undefined ,
2931 } ,
3032 false ,
31- true ,
33+ true
3234 ) ;
3335
3436 await tsDownExecutor . execute ( ) ;
@@ -37,13 +39,13 @@ async function buildAction(inputPath: string, options: any) {
3739export const buildCommand = new Command ( )
3840 . command ( "build" )
3941 . description ( "Build the project for production" )
40- . argument ( "< inputPath> " , "Path to the input file or directory." )
42+ . argument ( "[ inputPath] " , "Path to the input file or directory." )
4143 . option ( "--output <path>" , "Set the output entrypoint" , "./dist" )
4244 . option ( "--show-builder-logs" , "Show builder logs" , false )
4345 . option (
4446 "-c, --config <configPath>" ,
4547 "Path to the config file" ,
46- "./tsdown.config.ts" ,
48+ "./tsdown.config.ts"
4749 )
4850 . option ( "--cwd <path>" , "Set the current working directory" , process . cwd ( ) )
4951 . action ( buildAction ) ;
0 commit comments