File tree 2 files changed +14
-5
lines changed
packages/react-email/src/cli/commands
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " react-email " : patch
3
+ ---
4
+
5
+ Log out errors that happen when ` export ` 's esbuild fails
Original file line number Diff line number Diff line change @@ -73,23 +73,27 @@ export const exportTemplates = async (
73
73
await build ( {
74
74
bundle : true ,
75
75
entryPoints : allTemplates ,
76
- plugins : [ renderingUtilitiesExporter ( allTemplates ) ] ,
77
- platform : 'node' ,
78
76
format : 'cjs' ,
77
+ jsx : 'transform' ,
79
78
loader : { '.js' : 'jsx' } ,
79
+ logLevel : 'silent' ,
80
80
outExtension : { '.js' : '.cjs' } ,
81
- jsx : 'transform' ,
82
- write : true ,
83
81
outdir : pathToWhereEmailMarkupShouldBeDumped ,
82
+ platform : 'node' ,
83
+ plugins : [ renderingUtilitiesExporter ( allTemplates ) ] ,
84
+ write : true ,
84
85
} ) ;
85
86
} catch ( exception ) {
86
- const buildFailure = exception as BuildFailure ;
87
87
if ( spinner ) {
88
88
spinner . stopAndPersist ( {
89
89
symbol : logSymbols . error ,
90
90
text : 'Failed to build emails' ,
91
91
} ) ;
92
92
}
93
+
94
+ const buildFailure = exception as BuildFailure ;
95
+ console . error ( `\n${ buildFailure . message } ` ) ;
96
+
93
97
process . exit ( 1 ) ;
94
98
}
95
99
You can’t perform that action at this time.
0 commit comments