@@ -552,6 +552,28 @@ async function init() {
552552 }
553553 }
554554
555+ let useRolldownVite = argRolldown
556+ if ( useRolldownVite === undefined ) {
557+ if ( interactive ) {
558+ const rolldownViteValue = await prompts . select ( {
559+ message : 'Use rolldown-vite (Experimental)?:' ,
560+ options : [
561+ {
562+ label : 'Yes' ,
563+ value : true ,
564+ hint : 'The future default Vite, which is powered by Rolldown' ,
565+ } ,
566+ { label : 'No' , value : false } ,
567+ ] ,
568+ initialValue : false ,
569+ } )
570+ if ( prompts . isCancel ( rolldownViteValue ) ) return cancel ( )
571+ useRolldownVite = rolldownViteValue
572+ } else {
573+ useRolldownVite = false
574+ }
575+ }
576+
555577 const pkgManager = pkgInfo ? pkgInfo . name : 'npm'
556578
557579 // 5. Ask about immediate install and package manager
@@ -600,28 +622,6 @@ async function init() {
600622 process . exit ( status ?? 0 )
601623 }
602624
603- let useRolldownVite = argRolldown
604- if ( useRolldownVite === undefined ) {
605- if ( interactive ) {
606- const rolldownViteValue = await prompts . select ( {
607- message : 'Use rolldown-vite (Experimental)?:' ,
608- options : [
609- {
610- label : 'Yes' ,
611- value : true ,
612- hint : 'The future default Vite, which is powered by Rolldown' ,
613- } ,
614- { label : 'No' , value : false } ,
615- ] ,
616- initialValue : false ,
617- } )
618- if ( prompts . isCancel ( rolldownViteValue ) ) return cancel ( )
619- useRolldownVite = rolldownViteValue
620- } else {
621- useRolldownVite = false
622- }
623- }
624-
625625 prompts . log . step ( `Scaffolding project in ${ root } ...` )
626626
627627 const templateDir = path . resolve (
0 commit comments