chore(npm/webpack-preprocessor): fix CI pipeline #17515
Merged
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.
User facing changelog
Fix CI pipeline for
webpack-preprocessor
. It started consistently failing (not sure why).Additional details
A while ago myself and Chris updated
webpack-preprocessor
to work with Webpack 5, but addingwebpack@5
to thepackage.json
messed up a lot of things in the monorepo.Instead, we added this script to install
webpack@5
as part of the test step forwebpack-preprocessor
. The main e2e tests run onwebpack@5
, all example projects onwebpack@4
. The goal was to get coverage for both Webpack versions.The script modifies
package.json
, installs webpack 5, runs the tests, then revertspackage.json
and runsyarn install
to install webpack 4 again. See that part here.For unknown reasons, the revert part seems to not be working as expected in the last few days, and the example tests run using webpack 5, instead of the expected webpack 4. Generally the examples should work with both versions of webpack.. The problem is the example React project which has some webpack 4 specific config. Specifically, it's using create react app, which uses a deprecated
node
configuration.This is no longer valid in webpack 5, which is why CI is failing. I don't why is started failing all of a sudden.
The solution is just to run the destructive tests that use webpack 5 as the last stage of the pipeline. I also updated the snapshots - some snapshots were actually failing, but CI was not. I think it was previously comparing webpack 4 snapshots against the webpack 5 tests, which is not correct.
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?