MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / shouldSuppressViteWarning

Function shouldSuppressViteWarning

packages/vite/helpers/logging.ts:113–131  ·  view source on GitHub ↗
(msg: string)

Source from the content-addressed store, hash-verified

111}
112
113function 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}

Callers 2

warnFunction · 0.85
warnOnceFunction · 0.85

Calls 1

includesMethod · 0.80

Tested by

no test coverage detected