@@ -216,11 +216,6 @@ export const build = async ({
216
216
spinner . text = 'Deleting pre-existing modified preview app folder' ;
217
217
await fs . promises . rm ( modifiedPreviewAppPath , { recursive : true } ) ;
218
218
}
219
- const builtPreviewAppPath = path . join ( process . cwd ( ) , '.react-email' ) ;
220
- if ( fs . existsSync ( builtPreviewAppPath ) ) {
221
- spinner . text = 'Deleting pre-existing .react-email folder' ;
222
- await fs . promises . rm ( builtPreviewAppPath , { recursive : true } ) ;
223
- }
224
219
225
220
spinner . text = 'Copying preview app from CLI to modify it' ;
226
221
await fs . promises . cp ( previewServerLocation , modifiedPreviewAppPath , {
@@ -264,25 +259,24 @@ export const build = async ({
264
259
} ) ;
265
260
await buildPreviewApp ( modifiedPreviewAppPath ) ;
266
261
267
- await fs . promises . mkdir ( builtPreviewAppPath ) ;
268
262
await fs . promises . cp (
269
263
path . join ( modifiedPreviewAppPath , '.next' ) ,
270
- path . join ( builtPreviewAppPath , '.next' ) ,
264
+ path . join ( process . cwd ( ) , '.next' ) ,
271
265
{
272
266
recursive : true ,
273
267
} ,
274
268
) ;
275
- await fs . promises . cp (
276
- path . join ( modifiedPreviewAppPath , 'public' ) ,
277
- path . join ( builtPreviewAppPath , 'public' ) ,
278
- {
279
- recursive : true ,
280
- } ,
281
- ) ;
282
-
283
- await fs . promises . rm ( modifiedPreviewAppPath , {
284
- recursive : true ,
285
- } ) ;
269
+ // await fs.promises.cp(
270
+ // path.join(modifiedPreviewAppPath, 'public'),
271
+ // path.join(builtPreviewAppPath, 'public'),
272
+ // {
273
+ // recursive: true,
274
+ // },
275
+ // );
276
+
277
+ // await fs.promises.rm(modifiedPreviewAppPath, {
278
+ // recursive: true,
279
+ // });
286
280
} catch ( error ) {
287
281
console . log ( error ) ;
288
282
process . exit ( 1 ) ;
0 commit comments