@@ -216,11 +216,6 @@ export const build = async ({
216216 spinner . text = 'Deleting pre-existing modified preview app folder' ;
217217 await fs . promises . rm ( modifiedPreviewAppPath , { recursive : true } ) ;
218218 }
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- }
224219
225220 spinner . text = 'Copying preview app from CLI to modify it' ;
226221 await fs . promises . cp ( previewServerLocation , modifiedPreviewAppPath , {
@@ -264,25 +259,24 @@ export const build = async ({
264259 } ) ;
265260 await buildPreviewApp ( modifiedPreviewAppPath ) ;
266261
267- await fs . promises . mkdir ( builtPreviewAppPath ) ;
268262 await fs . promises . cp (
269263 path . join ( modifiedPreviewAppPath , '.next' ) ,
270- path . join ( builtPreviewAppPath , '.next' ) ,
264+ path . join ( process . cwd ( ) , '.next' ) ,
271265 {
272266 recursive : true ,
273267 } ,
274268 ) ;
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+ // });
286280 } catch ( error ) {
287281 console . log ( error ) ;
288282 process . exit ( 1 ) ;
0 commit comments