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

CT DevServer should not watch files in Run Mode #22959

Closed
ZachJW34 opened this issue Jul 27, 2022 · 2 comments · Fixed by #24097
Closed

CT DevServer should not watch files in Run Mode #22959

ZachJW34 opened this issue Jul 27, 2022 · 2 comments · Fixed by #24097
Assignees
Labels
CT Issue related to component testing

Comments

@ZachJW34
Copy link
Contributor

Current behavior

The webpack and vite dev-servers, by default, watch all compilation files. This makes sense in open mode, but there is no need to do this in run-mode and can be taxing, especially when it comes to CI machines. We disable all config/spec watching in run-mode, but this philosophy doesn't extend to the CT dev-servers.

Desired behavior

Disable file watching for CT dev-servers when using run mode.

Test code to reproduce

  1. Check out the branch my branch on cypress-component-testing-apps
  2. cd ./react-cra5-ts
  3. npm i
  4. npx cypress run --component
  5. After you see the webpack compile stats in the terminal, edit src/App.tsx. You will see another webpack recompilation. I've added a long wait in the spec to allow time to tweak while the test is running.

Screen Shot 2022-07-27 at 2 42 18 PM

Cypress Version

10.3.1

Other

I've only tested webpack but I'm assuming vite is the same. There are some other options we should consider disabling, such as liveReload and hmr if applicable.

@cypress-bot cypress-bot bot added stage: review and removed stage: needs review The PR code is done & tested, needs review labels Oct 4, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 5, 2022

The code for this is done in cypress-io/cypress#24097, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 11, 2022

Released in 10.10.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.10.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CT Issue related to component testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants