Open GrayedFox opened 2 months ago
Hmm, rebuilds are triggered by two elements: either esbuild detects a filesystem change or the cypress event that implies the tests have changed. https://github.com/fochlac/cypress-ct-custom-devserver/blob/main/src/index.ts#L94 You could try disabling either of them. In general the logging for rebuilds is not great though, I have the feeling it fires too much. Reloading is working for us in our company, but we have some memory issues as well. I assumed it's caused by tests mounting the whole application, but if you can find something that would be great.
I also found I had some unmerged changes on the 1.2 release branch that checks if a rebuild is truly required for the cypress-tests-changed-event. I'll release a 1.4.0 with that fix so you can test and check if that helps :) https://github.com/fochlac/cypress-devserver-esbuild/compare/ee1869e66be5652a2ec8711a2112792832244f72...c4c00b25f0c48140c749c92f04999e49b6106659
Can be reproduced simply by adding a click event to a button that refreshes the current page or simply by using
cy.reload()
from inside a component test.Something maybe worth noting is that a refresh isn't a rebuild - or at least - should probably not be treated as such.
Will do some more digging to try and find a fix/more insightful info and update this issue when I can ⚡