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