Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we provide a configuration that removes the prompt by "Could not Fast Refresh"? This is annoying. #208

Closed
4 tasks done
llyp618 opened this issue Aug 14, 2023 · 1 comment

Comments

@llyp618
Copy link

llyp618 commented Aug 14, 2023

Description

About "#consistent-components-exports", exporting constant or something in TSX or JSX files is a very common scene. I know that this will cause react refresh abnormality, but I may not want to see this annoying Warning

Suggested solution

provide a configuration that removes the prompt: react({ refreshWarning: false})

Alternative

No response

Additional context

No response

Validations

@ArnaudBarre
Copy link
Member

hot.invalidate that invalidate HMR is builtin in core as a warning. And I don't really want for people to be easy to mess up with HMR and then get the sensation that Vite has bad HMR. If you don't care about this, I see two options for you:

  • Don't use this plugin and let esbuild handles everything. This will cause full-reload for every JS change
  • Provide a custom logger in the Vite config and use the fallback handler for everything expect the "annoying" warning

@ArnaudBarre ArnaudBarre closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants