From dfee55221c6a85398b41db0ca9f5cae9d078c945 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 13 Jul 2020 14:01:11 -0400 Subject: [PATCH] Update Fast Refresh full reload warning (#15062) We've added a Babel warning for unnamed default exports, and this PR addresses the remaining points in #13024. Fixes #13024 --- packages/next/client/dev/error-overlay/hot-dev-client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/next/client/dev/error-overlay/hot-dev-client.js b/packages/next/client/dev/error-overlay/hot-dev-client.js index ca1a32e972..c0854a3890 100644 --- a/packages/next/client/dev/error-overlay/hot-dev-client.js +++ b/packages/next/client/dev/error-overlay/hot-dev-client.js @@ -269,11 +269,11 @@ function tryApplyUpdates(onHotUpdateSuccess) { if (err) { console.warn( '[Fast Refresh] performing full reload\n\n' + - "Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React tree.\n" + - 'You might have a file which renders a React component but also exports a value that is imported by a non-React component.\n' + + "Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\n" + + 'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\n' + 'Consider migrating the non-React component export to a separate file and importing it into both files.\n\n' + - 'It is also possible you are using class components at the top-level of your application, which disables Fast Refresh.\n' + - 'Fast Refresh requires at least one function component in your React tree.' + 'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\n' + + 'Fast Refresh requires at least one parent function component in your React tree.' ) } else if (hadRuntimeError) { console.warn( -- GitLab