File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export function withSentryBabelTransformer(config: MetroConfig): MetroConfig {
104104 logger . debug ( 'Default Babel transformer path from `config.transformer`:' , defaultBabelTransformerPath ) ;
105105
106106 if ( ! defaultBabelTransformerPath ) {
107+ // This has to be console.warn because the options is enabled but won't be used
107108 // eslint-disable-next-line no-console
108109 console . warn ( '`transformer.babelTransformerPath` is undefined.' ) ;
109110 // eslint-disable-next-line no-console
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export function cleanDefaultBabelTransformerPath(): void {
4444 }
4545 logger . debug ( 'Cleaned default Babel transformer path' ) ;
4646 } catch ( e ) {
47+ // We don't want to fail the build if we can't clean the file
4748 // eslint-disable-next-line no-console
4849 console . error ( '[Sentry] Failed to clean default Babel transformer path:' , e ) ;
4950 }
@@ -59,7 +60,7 @@ function getDefaultBabelTransformerPath(): string {
5960export function loadDefaultBabelTransformer ( ) : BabelTransformer {
6061 const defaultBabelTransformerPath = readDefaultBabelTransformerPath ( ) ;
6162 if ( ! defaultBabelTransformerPath ) {
62- throw new Error ( 'Default Babel transformer path not found' ) ;
63+ throw new Error ( 'Default Babel Transformer Path not found in `.sentry` directory. ' ) ;
6364 }
6465
6566 logger . debug ( `Loading default Babel transformer from ${ defaultBabelTransformerPath } ` ) ;
You can’t perform that action at this time.
0 commit comments