File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
turbopack/crates/turbopack-swc-utils/src Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -123,14 +123,29 @@ impl Emitter for IssueEmitter {
123123 let severity = if is_lint {
124124 IssueSeverity :: Suggestion
125125 } else {
126+ // Check if this is a duplicate binding error and downgrade to warning
127+ let is_duplicate_binding_error = message. contains ( "defined multiple times" ) ;
128+
126129 match level {
127130 Level :: Bug => IssueSeverity :: Bug ,
128131 Level :: Fatal | Level :: PhaseFatal => IssueSeverity :: Fatal ,
129- Level :: Error => IssueSeverity :: Error ,
132+ Level :: Error => {
133+ if is_duplicate_binding_error {
134+ IssueSeverity :: Warning
135+ } else {
136+ IssueSeverity :: Error
137+ }
138+ }
130139 Level :: Warning => IssueSeverity :: Warning ,
131140 Level :: Note => IssueSeverity :: Note ,
132141 Level :: Help => IssueSeverity :: Hint ,
133- Level :: Cancelled => IssueSeverity :: Error ,
142+ Level :: Cancelled => {
143+ if is_duplicate_binding_error {
144+ IssueSeverity :: Warning
145+ } else {
146+ IssueSeverity :: Error
147+ }
148+ }
134149 Level :: FailureNote => IssueSeverity :: Note ,
135150 }
136151 } ;
You can’t perform that action at this time.
0 commit comments