Update example webpack to run under Node.js 18 #708
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.
This PR resolves issue #686 "webpack examples fail locally on Node.js 18 (LTS)"
For
in
webpack.config.js
contentBase
is replaced by static directorydevelopment
is added andthe versions of the following npm packages are bumped:
finally
.gitignore
file is added, which containsdist/
, to ensure that a local run of the test does not inadvertently cause files created by the test to be committed to the repository.Verification
GitHub test
Check the Actions log on https://github.com/cypress-io/github-action/actions/workflows/example-webpack.yml?query=branch%3Amaster and ensure that the Status is "Success"
Local test
Open a terminal window on a local clone of the repository:
cd examples/v9/webpack nvm use 18.13.0 npm ci npx webpack
Ensure that the output is:
"webpack 5.75.0 compiled successfully"
and that there are no error messages displayed.
Following on from the previous test to check in
examples/webpack
cd ../../webpack nvm use 18.13.0 npm ci npx webpack
Ensure that the output is:
"webpack 5.75.0 compiled successfully"
and that there are no error messages displayed.
Execute
and check that no new files are found by
git
.