fix: avoid filename conflict#41
Merged
Merged
Conversation
Collaborator
|
Need to run |
Author
Thanks. Done ✅ |
robcmills
added a commit
to robcmills/cypress-rspack-dev-server
that referenced
this pull request
Apr 2, 2026
…eractive mode The contenthash in output.filename (added in PR th3fallen#41) caused a mismatch with the hardcoded relativeUrl in loader.ts, resulting in 404 errors for spec files in interactive mode (cypress open). The contenthash cannot be resolved at loader time since the hash depends on the compilation output. Reverting to [name].js since cache busting via filename hashing is unnecessary for a dev server. Closes th3fallen#45 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
robcmills
added a commit
to robcmills/cypress-rspack-dev-server
that referenced
this pull request
Apr 2, 2026
PR th3fallen#41 added [contenthash] to the output filename to fix intermittent "Loading chunk" errors in CI. However, this caused a mismatch with the hardcoded relativeUrl in loader.ts, producing 404 errors in interactive mode (cypress open). The contenthash cannot be resolved at loader time since the hash depends on compilation output which includes the loader output — a circular dependency. The real fix for chunk loading conflicts is output.uniqueName, which namespaces the chunk loading runtime to prevent collisions between the app's rspack/webpack instance and Cypress's, without requiring filename hashing. Closes th3fallen#45 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
xfsnowind
pushed a commit
that referenced
this pull request
Apr 9, 2026
…ve mode (#46) * fix: remove contenthash from output filename to fix 404 errors in interactive mode The contenthash in output.filename (added in PR #41) caused a mismatch with the hardcoded relativeUrl in loader.ts, resulting in 404 errors for spec files in interactive mode (cypress open). The contenthash cannot be resolved at loader time since the hash depends on the compilation output. Reverting to [name].js since cache busting via filename hashing is unnecessary for a dev server. Closes #45 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: replace contenthash with uniqueName to fix 404s in interactive mode PR #41 added [contenthash] to the output filename to fix intermittent "Loading chunk" errors in CI. However, this caused a mismatch with the hardcoded relativeUrl in loader.ts, producing 404 errors in interactive mode (cypress open). The contenthash cannot be resolved at loader time since the hash depends on compilation output which includes the loader output — a circular dependency. The real fix for chunk loading conflicts is output.uniqueName, which namespaces the chunk loading runtime to prevent collisions between the app's rspack/webpack instance and Cypress's, without requiring filename hashing. Closes #45 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: use webpackChunkName magic comment instead of rspackChunkName Rspack recognizes webpackChunkName (for webpack compatibility) but not rspackChunkName. This caused chunks to get auto-generated names (e.g. component_Test_cy_tsx) instead of the intended names (spec-0), making the hardcoded relativeUrl in the loader 404. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: revert unrelated snapshot change Restore Symbol(shapeMode) line in snapshot to match main — the removal was caused by a local Node.js version difference and is unrelated to the contenthash fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a 'Loading chunk error' issue that happens sometimes in the CI. The test is running correctly but sometimes the test fails to load the test file in the CI.