| 111 | } |
| 112 | |
| 113 | function shouldSuppressViteWarning(msg: string): boolean { |
| 114 | // Missing sourcemap original sources |
| 115 | if (msg.startsWith('Sourcemap for ') && msg.includes('missing source files')) { |
| 116 | return true; |
| 117 | } |
| 118 | // Vendor eval usage (third-party libs aggregated); benign |
| 119 | if (msg.includes('Use of eval') && (msg.includes('@nativescript/vendor') || msg.includes('"@nativescript/vendor"'))) { |
| 120 | return true; |
| 121 | } |
| 122 | // Annotation/license position warning for vendor bundle |
| 123 | if ((msg.includes('contains an annotation that Rollup cannot interpret') || msg.includes('position of the comment')) && (msg.includes('@nativescript/vendor') || msg.includes('"@nativescript/vendor"'))) { |
| 124 | return true; |
| 125 | } |
| 126 | // Analog Angular optimizer/router plugins do not emit sourcemaps; Vite floods logs with warnings. |
| 127 | if (msg.includes('Sourcemap is likely to be incorrect') && (msg.includes('analogjs-router-optimization') || msg.includes('@analogjs/vite-plugin-angular-optimizer'))) { |
| 128 | return true; |
| 129 | } |
| 130 | return false; |
| 131 | } |