@@ -49,8 +49,6 @@ export const renderEmailByPath = async (
4949 return cache . get ( emailPath ) ! ;
5050 }
5151
52- const timeBeforeEmailRendered = performance . now ( ) ;
53-
5452 const emailFilename = path . basename ( emailPath ) ;
5553 let spinner : Ora | undefined ;
5654 if ( ! isBuilding && ! isPreviewDevelopment ) {
@@ -61,6 +59,7 @@ export const renderEmailByPath = async (
6159 registerSpinnerAutostopping ( spinner ) ;
6260 }
6361
62+ const timeBeforeEmailBundled = performance . now ( ) ;
6463 const originalJsxRuntimePath = path . resolve (
6564 previewServerLocation ,
6665 'jsx-runtime' ,
@@ -70,6 +69,7 @@ export const renderEmailByPath = async (
7069 originalJsxRuntimePath ,
7170 ) ;
7271 const componentResult = await getEmailComponent ( emailPath , jsxRuntimePath ) ;
72+ const millisecondsToBundled = performance . now ( ) - timeBeforeEmailBundled ;
7373
7474 if ( 'error' in componentResult ) {
7575 spinner ?. stopAndPersist ( {
@@ -90,6 +90,7 @@ export const renderEmailByPath = async (
9090 const previewProps = Email . PreviewProps || { } ;
9191 const EmailComponent = Email as React . FC ;
9292 try {
93+ const timeBeforeEmailRendered = performance . now ( ) ;
9394 const element = createElement ( EmailComponent , previewProps ) ;
9495 const markupWithReferences = await renderWithReferences ( element , {
9596 pretty : true ,
@@ -117,7 +118,7 @@ export const renderEmailByPath = async (
117118 }
118119 spinner ?. stopAndPersist ( {
119120 symbol : logSymbols . success ,
120- text : `Successfully rendered ${ emailFilename } in ${ timeForConsole } ` ,
121+ text : `Successfully rendered ${ emailFilename } in ${ timeForConsole } (bundled in ${ millisecondsToBundled . toFixed ( 0 ) } ms) ` ,
121122 } ) ;
122123
123124 const renderingResult : RenderedEmailMetadata = {
0 commit comments