Skip to content

feat: ship webpack-bundle-analyzer with@cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor #31588

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 2 commits into from
May 12, 2025

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Apr 25, 2025

to help better diagnose build issues for cypress users

Additional details

There are still come comments funneling in on #28644 where cypress-support-file fails with a chunk load error during component testing. This is usually due to the support file being quite large, sometimes having a large inline source map in the bundle. This change is to help diagnose what is going on in the end user's bundle without having them need to set up a customer webpack-bundle-analyzer to see what is going on.

Steps to test

enable the feature via setting the cypress-verbose:webpack-batteries-included-preprocessor:bundle-analyzer when running e2e tests and and cypress-verbose:webpack-dev-server:bundle-analyzer when running CT tests.

The bundle analyzer should host a visual representation of the bundle on port 8888

Example when running e2e

Screenshot 2025-05-01 at 2 58 53 PM

Example when running ct

Screenshot 2025-05-01 at 2 13 04 PM

How has the user experience changed?

PR Tasks

@AtofStryker AtofStryker changed the title feat: ship webpack-bundle-analyzer with @cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor feat (DRAFT): ship webpack-bundle-analyzer with @cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor Apr 25, 2025
@AtofStryker AtofStryker self-assigned this Apr 25, 2025
Copy link

cypress bot commented Apr 25, 2025

cypress    Run #62362

Run Properties:  status check failed Failed #62362  •  git commit f58cc8957f: Update npm/webpack-dev-server/test/devServer-unit.spec.ts
Project cypress
Branch Review feat/add_webpack_bundle_analyzer
Run status status check failed Failed #62362
Run duration 15m 31s
Commit git commit f58cc8957f: Update npm/webpack-dev-server/test/devServer-unit.spec.ts
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 25
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 575
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  

Tests for review

Failed  cypress\e2e\studio\studio-cloud.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
Studio Cloud > immediately loads the studio panel Test Replay Screenshots
Flakiness  cypress\e2e\studio\studio-cloud.cy.ts • 4 flaky tests • app-e2e

View Output

Test Artifacts
Studio Cloud > hides selector playground and studio controls when studio beta is available Test Replay Screenshots
Studio Cloud > closes studio panel when clicking studio button (from the cloud) Test Replay Screenshots
Studio Cloud > opens studio panel to new test when clicking on studio button (from the app) next to url Test Replay Screenshots
Studio Cloud > opens a cloud studio session with AI enabled Test Replay Screenshots

@AtofStryker AtofStryker force-pushed the feat/add_webpack_bundle_analyzer branch from 07d2be0 to 71a034e Compare April 30, 2025 18:14
@AtofStryker AtofStryker changed the title feat (DRAFT): ship webpack-bundle-analyzer with @cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor feat: ship webpack-bundle-analyzer with @cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor May 1, 2025
@AtofStryker AtofStryker force-pushed the feat/add_webpack_bundle_analyzer branch from 71a034e to a458533 Compare May 1, 2025 19:45
@AtofStryker AtofStryker changed the title feat: ship webpack-bundle-analyzer with @cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor feat: ship webpack-bundle-analyzer with@cypress/webpack-dev-server and @cypress/webpack-batteries-included-preprocessor May 2, 2025
@AtofStryker AtofStryker force-pushed the feat/add_webpack_bundle_analyzer branch from a458533 to 77bcd6f Compare May 6, 2025 20:35
AtofStryker and others added 2 commits May 12, 2025 13:59
…nd @cypress/webpack-batteries-included-preprocessor to help better diagnose build issues for cypress users
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
@AtofStryker AtofStryker force-pushed the feat/add_webpack_bundle_analyzer branch from e33f37f to f58cc89 Compare May 12, 2025 17:59
@AtofStryker AtofStryker merged commit 46f2867 into develop May 12, 2025
132 of 137 checks passed
@AtofStryker AtofStryker deleted the feat/add_webpack_bundle_analyzer branch May 12, 2025 21:26
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2025

Released in 14.4.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 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.

Add webpack-bundle-analyzer to @cypress/webpack-dev-server
3 participants