@@ -43,6 +43,8 @@ export async function checkInvalidFunctions(
4343
4444 await tryToFixI18nFunctions ( collectedFunctions , opts ) ;
4545
46+ await fixFaviconInvalidRSCFuncFunction ( collectedFunctions ) ;
47+
4648 await tryToFixInvalidFuncsWithValidIndexAlternative ( collectedFunctions ) ;
4749 await tryToFixInvalidDynamicISRFuncs ( collectedFunctions ) ;
4850
@@ -138,6 +140,28 @@ async function fixActionInvalidFuncFunctions({
138140 }
139141}
140142
143+ /**
144+ * Since 46.1.0 the Vercel CLI generates incorrect favicon RSC functions,
145+ * they are safe to ignore without any downside, this functions makes sure
146+ * that such favicon RSC functions do get ignored
147+ *
148+ * @param collectedFunctions Collected functions from the Vercel build output.
149+ */
150+ async function fixFaviconInvalidRSCFuncFunction ( {
151+ invalidFunctions,
152+ ignoredFunctions,
153+ } : CollectedFunctions ) : Promise < void > {
154+ for ( const [ fullPath , fnInfo ] of invalidFunctions . entries ( ) ) {
155+ if ( fnInfo . relativePath === '/favicon.ico.rsc.func' ) {
156+ ignoredFunctions . set ( fullPath , {
157+ reason : 'invalid favicon.ico.rsc.func functions are ignored' ,
158+ ...fnInfo ,
159+ } ) ;
160+ invalidFunctions . delete ( fullPath ) ;
161+ }
162+ }
163+ }
164+
141165/**
142166 * In the App router, error boundaries are implemented as client components
143167 * (see: https://nextjs.org/docs/app/api-reference/file-conventions/error), meaning that they
0 commit comments