Skip to content

Commit

Permalink
add filename to babel warning about anonymous function default exports (
Browse files Browse the repository at this point in the history
#31322)

fixes #29667

I didn't add an integration test, but I can take a stab at it if you point me in the right direction!
  • Loading branch information
bywo committed Nov 15, 2021
1 parent e517175 commit 8c54713
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -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'),
Expand Down

0 comments on commit 8c54713

Please sign in to comment.