File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed 
packages/react-email/src/commands Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -222,12 +222,11 @@ export const build = async ({
222222      await  fs . promises . rm ( builtPreviewAppPath ,  {  recursive : true  } ) ; 
223223    } 
224224
225-     spinner . text  =  'Copying preview app from CLI  to modify it' ; 
225+     spinner . text  =  'Copying preview app to modify it' ; 
226226    await  fs . promises . cp ( previewServerLocation ,  modifiedPreviewAppPath ,  { 
227227      recursive : true , 
228228      filter : ( source : string )  =>  { 
229229        return  ( 
230-           ! / ( \/ | \\ ) c l i ( \/ | \\ ) ? / . test ( source )  && 
231230          ! / ( \/ | \\ ) \. n e x t ( \/ | \\ ) ? / . test ( source )  && 
232231          ! / ( \/ | \\ ) \. t u r b o ( \/ | \\ ) ? / . test ( source ) 
233232        ) ; 
@@ -265,24 +264,11 @@ export const build = async ({
265264    await  buildPreviewApp ( modifiedPreviewAppPath ) ; 
266265
267266    await  fs . promises . mkdir ( builtPreviewAppPath ) ; 
268-     await  fs . promises . cp ( 
267+     await  fs . promises . symlink ( 
269268      path . join ( modifiedPreviewAppPath ,  '.next' ) , 
270269      path . join ( builtPreviewAppPath ,  '.next' ) , 
271-       { 
272-         recursive : true , 
273-       } , 
274-     ) ; 
275-     await  fs . promises . cp ( 
276-       path . join ( modifiedPreviewAppPath ,  'public' ) , 
277-       path . join ( builtPreviewAppPath ,  'public' ) , 
278-       { 
279-         recursive : true , 
280-       } , 
270+       'dir' , 
281271    ) ; 
282- 
283-     await  fs . promises . rm ( modifiedPreviewAppPath ,  { 
284-       recursive : true , 
285-     } ) ; 
286272  }  catch  ( error )  { 
287273    console . log ( error ) ; 
288274    process . exit ( 1 ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments