-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress extreme slow initial test with Webpack 5 + Typescript #15447
Comments
this is exactly what I've been investigating. What happens is that inside the cypress plugin https://github.com/cypress-io/cypress/blob/develop/npm/webpack-preprocessor/index.ts#L305 onCompile is called before the timeout finishes for the handler is called with the result: Therefore the handler resolves the 2nd promise - but the 1st promise is the one that is sent back to the proprocessor and the ipc interface. The call to get the js times out after 2 minutes and is retried. The second time the file is in the cache and is served. I get this most of the time in webpack 5, but it is intermittant. |
The code for this is done in cypress-io/cypress#15611, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
The first test run with
open
is extreme slow with Webpack 5 and a typescript setup. However when usingrun
command it goes fast (as expected). Downgrading to Webpack 4 makes it a lot faster. The message "Your tests are loading" takes about 2 minutes. After which it proceeds to execute the test. Running this with the cypress-preprocessor-webpack-5 did not change anything. I added a complete debug log from a webpack 5 run. Tested with Chrome on Linux, however this also occurs on FireFox and other browsers. I tested on Windows as well, same issue.Desired behavior
The first test with Webpack 5 should be equally fast as Webpack 4.
Test code to reproduce
I have provided a test repository: https://github.com/petermanders89/cypress-test-repo
Versions
You can see it in the repository, but here are the installed and used versions. Changing Webpack 5 to Webpack 4 solves it, but that's not desired behavior.
logs.txt
The text was updated successfully, but these errors were encountered: