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 ({
222
222
await fs . promises . rm ( builtPreviewAppPath , { recursive : true } ) ;
223
223
}
224
224
225
- spinner . text = 'Copying preview app from CLI to modify it' ;
225
+ spinner . text = 'Copying preview app to modify it' ;
226
226
await fs . promises . cp ( previewServerLocation , modifiedPreviewAppPath , {
227
227
recursive : true ,
228
228
filter : ( source : string ) => {
229
229
return (
230
- ! / ( \/ | \\ ) c l i ( \/ | \\ ) ? / . test ( source ) &&
231
230
! / ( \/ | \\ ) \. n e x t ( \/ | \\ ) ? / . test ( source ) &&
232
231
! / ( \/ | \\ ) \. t u r b o ( \/ | \\ ) ? / . test ( source )
233
232
) ;
@@ -265,24 +264,11 @@ export const build = async ({
265
264
await buildPreviewApp ( modifiedPreviewAppPath ) ;
266
265
267
266
await fs . promises . mkdir ( builtPreviewAppPath ) ;
268
- await fs . promises . cp (
267
+ await fs . promises . symlink (
269
268
path . join ( modifiedPreviewAppPath , '.next' ) ,
270
269
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' ,
281
271
) ;
282
-
283
- await fs . promises . rm ( modifiedPreviewAppPath , {
284
- recursive : true ,
285
- } ) ;
286
272
} catch ( error ) {
287
273
console . log ( error ) ;
288
274
process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments