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

fix(cypress/react): disable react-refresh for craco setups #18517

Merged
merged 3 commits into from
Oct 19, 2021
Merged

fix(cypress/react): disable react-refresh for craco setups #18517

merged 3 commits into from
Oct 19, 2021

Conversation

mohatt
Copy link
Contributor

@mohatt mohatt commented Oct 16, 2021

  • React fast refresh causes ReactDevTools to not work properly in React apps that use craco, this PR fixes the issue by disabling fast refresh.
  • See:
    // this is required because
    // 1) we use our own HMR and we don't need react-refresh transpiling overhead
    // 2) it doesn't work with process.env=test @see https://github.com/cypress-io/cypress-realworld-app/pull/832
    process.env.FAST_REFRESH = 'false'

User facing changelog

Additional details

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 16, 2021

Thanks for taking the time to open a PR!

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2021

CLA assistant check
All committers have signed the CLA.

@jennifer-shehane jennifer-shehane requested a review from a team October 18, 2021 14:54
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohatt Thanks for the contribution! Could you please sign our CLA?

@mohatt
Copy link
Contributor Author

mohatt commented Oct 18, 2021

@jennifer-shehane Thanks! I've signed the CLA

@mohatt mohatt requested a review from ZachJW34 October 19, 2021 06:04
@mohatt
Copy link
Contributor Author

mohatt commented Oct 19, 2021

@ZachJW34 @lmiller1990 Fixed the eslint error. Let me know if you need any further changes. Thanks!

@jennifer-shehane jennifer-shehane dismissed their stale review October 19, 2021 18:24

Dismissing my review

@ZachJW34 ZachJW34 merged commit ea10795 into cypress-io:develop Oct 19, 2021
@mohatt mohatt deleted the patch-1 branch October 19, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants