Skip to content

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented May 19, 2025

Additional details

With the release of Cypress 15, we are removing the default built-ins from the @cypress/webpack-batteries-included-preprocessor as they are usually not used by end users within their cypress tests and bloat the user bundle. This is also to reduce security vulnerabilities introduced by the built-ins.

Note: some tests needed to be pulled out into their own directory to prevent cross-pollination of the build-ins in the cypress config. Hence why the screenshots test and the node built in test were both moved

Steps to test

If wanting to use the built-ins, set up a project that has references to path within your spec file. notice the test fails because path is no longer provided by the preprocessor

How has the user experience changed?

PR Tasks

@AtofStryker AtofStryker changed the title breaking: remove webpack built-ins shimmed in from webpack 4 to 5 upg… breaking: remove built-ins from @cypress/webpack-batteries-included-preprocessor May 19, 2025
@cypress
Copy link

cypress bot commented May 19, 2025

cypress    Run #62714

Run Properties:  status check passed Passed #62714  •  git commit 419157f7cd: Update cli/CHANGELOG.md
Project cypress
Branch Review breaking/remove_built_ins_from_webpack_5
Run status status check passed Passed #62714
Run duration 18m 46s
Commit git commit 419157f7cd: Update cli/CHANGELOG.md
Committer Bill Glesias
View all properties for this run ↗︎

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

@AtofStryker AtofStryker force-pushed the breaking/remove_built_ins_from_webpack_5 branch 3 times, most recently from 9066b10 to 7a6c78c Compare May 21, 2025 19:27
…rade as they should no longer be needed for most users
@AtofStryker AtofStryker force-pushed the breaking/remove_built_ins_from_webpack_5 branch from 7a6c78c to 2ca3df4 Compare May 21, 2025 19:46
@AtofStryker AtofStryker self-assigned this May 21, 2025
// This is critical if a user is trying to debug to determine if they have large source maps or other large files in their dev-server under test
describe('writes to disk if DEBUG=cypress-verbose:webpack-dev-server:bundle-analyzer is set', async () => {
const WEBPACK_DEV_SERVER_VERSIONS: (4 | 5)[] = [4, 5]
const WEBPACK_DEV_SERVER_VERSIONS: (5)[] = [5]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we have a bad merge into the 15 branch. This is very likely failing

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.

A couple of copy updates

],
resolve: {
extensions: ['.js', '.json', '.jsx', '.mjs', '.coffee'],
fallback: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to set everything to false or can we just not provide the fallback config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly it isn't entirely clear 😂 . The recommendation AFAIK is to set the fallback to false. What I have noticed, though it isn't documented, is the polyfills sometimes make their way in when you don't specify a config and they just happen to exist in your node_modules directory. But that might be a side effect of something else

Screenshot 2025-05-28 at 6 17 54 PM

Copy link
Contributor

@mschile mschile left a comment

Choose a reason for hiding this comment

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

Looks good! Just had one question.

@AtofStryker AtofStryker merged commit 8b8230b into release/15.0.0 May 29, 2025
85 of 87 checks passed
@AtofStryker AtofStryker deleted the breaking/remove_built_ins_from_webpack_5 branch May 29, 2025 04:16
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 20, 2025

Released in 15.0.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants