Skip to content

breaking: remove support for webpack 4 and webpack-dev-server 4 inside @cypress/webpack-preprocessor and @cypress/webpack-dev-server #31506

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Apr 14, 2025

Additional details

With Cypress 15, we have made the decision to remove support for Webpack 4. With Webpack 4 being no longer actively maintained and Webpack 5 being out for almost 5 years, we have made the decision to remove support for Webpack 4 from @cypress/webpack-preprocessor and @cypress/webpack-dev-server. Additionally, we are removing Webpack Dev Server 4 support from @cypress/webpack-dev-server as it is in maintenance mode and only receiving security updates.

This change may be disruptive to some users, hence why we have a full migration guide to help users transition.

Steps to test

The system tests have been modified to error if a user has webpack 4 or webpack-dev-server 4 installed, which seem valuable since the usage is still somewhat high and we want to make sure to handle the error gracefully.

The other option is to test the built binaries against a webpack/webpack-dev-server 4 setup, which can be seen in this repo off of a few different branches

How has the user experience changed?

Users will notice when scaffolding a webpack project in Cypress 15 that webpack 4 no longer fulfills the scafolded dependency list

Screenshot 2025-04-29 at 4 37 56 PM

If skipping this, or installing Cypress 15 with either Webpack 4 or Webpack Dev Server 4, the following errors with throw from the config instantiation

Screenshot 2025-04-29 at 5 19 21 PM Screenshot 2025-04-29 at 4 38 18 PM

The only way to work around this is the method laid out in the migration guide, which I have tested in https://github.com/AtofStryker/cypress-webpack-4 on various branches

PR Tasks

Copy link

cypress bot commented Apr 14, 2025

cypress    Run #62068

Run Properties:  status check passed Passed #62068  •  git commit 1e3740474e: breaking: the minimum version of webpack for webpack-preprocessor and webpack-ba...
Project cypress
Branch Review breaking/remove_webpack_4
Run status status check passed Passed #62068
Run duration 15m 53s
Commit git commit 1e3740474e: breaking: the minimum version of webpack for webpack-preprocessor and webpack-ba...
Committer AtofStryker
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 29
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 794
View all changes introduced in this branch ↗︎
UI Coverage  63.64%
  Untested elements 30  
  Tested elements 56  
Accessibility  96.18%
  Failed rules  0 critical   4 serious   1 moderate   0 minor
  Failed elements 193  

@AtofStryker AtofStryker force-pushed the breaking/remove_webpack_4 branch 4 times, most recently from 7f9ebf0 to 8e1a482 Compare April 29, 2025 18:19
@@ -59,7 +59,7 @@
"typescript": "~5.4.5"
},
"peerDependencies": {
"@cypress/webpack-preprocessor": "^5.4.4"
"@cypress/webpack-preprocessor": "^6.0.4"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will need to be @cypress/webpack-preprocessor@7 in Cypress 15

@AtofStryker AtofStryker force-pushed the breaking/remove_webpack_4 branch from 8e1a482 to 0de82b3 Compare April 29, 2025 18:22
@AtofStryker AtofStryker changed the title breaking(WIP): remove support for webpack 4 and webpack-dev-server 4 inside @cypress/webpack-preprocessor and @cypress/webpack-dev-server breaking: remove support for webpack 4 and webpack-dev-server 4 inside @cypress/webpack-preprocessor and @cypress/webpack-dev-server Apr 29, 2025
@AtofStryker AtofStryker self-assigned this Apr 29, 2025
@AtofStryker AtofStryker force-pushed the breaking/remove_webpack_4 branch from 0de82b3 to ec495dd Compare April 29, 2025 19:32
@AtofStryker AtofStryker changed the title breaking: remove support for webpack 4 and webpack-dev-server 4 inside @cypress/webpack-preprocessor and @cypress/webpack-dev-server breaking: remove support for webpack 4 and webpack-dev-server 4 inside @cypress/webpack-preprocessor and @cypress/webpack-dev-server Apr 29, 2025
… webpack-batteries-included-preprocessor is webpack 5. both packages need a breaking version published (check the peerDeps in WBIP)"

breaking: webpack/wds v4 is no longer supported in @cypress/webpack-dev-server

update changelog and clean up comments
@AtofStryker AtofStryker force-pushed the breaking/remove_webpack_4 branch from ec495dd to 1e37404 Compare April 29, 2025 21:31
@AtofStryker
Copy link
Contributor Author

going to merge this in with the semantic PR failure because we want a separate change item fro wbip and wds

@AtofStryker AtofStryker merged commit 2fd8712 into release/15.0.0 May 1, 2025
130 of 133 checks passed
@AtofStryker AtofStryker deleted the breaking/remove_webpack_4 branch May 1, 2025 17:28
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.

breaking: remove support for webpack-dev-server v4 in @cypress/webpack-dev-server Webpack 4 Removal
2 participants