diff --git a/packages/next/build/babel/plugins/no-anonymous-default-export.ts b/packages/next/build/babel/plugins/no-anonymous-default-export.ts index f97c76b0cf4d7..3cb1c775be62d 100644 --- a/packages/next/build/babel/plugins/no-anonymous-default-export.ts +++ b/packages/next/build/babel/plugins/no-anonymous-default-export.ts @@ -40,6 +40,7 @@ export default function NoAnonymousDefaultExport({ chalk.yellow.bold( 'Anonymous arrow functions cause Fast Refresh to not preserve local component state.' ), + chalk.cyan(this.file.opts.filename), 'Please add a name to your function, for example:', '', chalk.bold('Before'), @@ -64,6 +65,7 @@ export default function NoAnonymousDefaultExport({ chalk.yellow.bold( 'Anonymous function declarations cause Fast Refresh to not preserve local component state.' ), + chalk.cyan(this.file.opts.filename), 'Please add a name to your function, for example:', '', chalk.bold('Before'),