Skip to content
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

feat: webpack 5 support #8929

Closed
wants to merge 6 commits into from
Closed

feat: webpack 5 support #8929

wants to merge 6 commits into from

Conversation

dmtrKovalenko
Copy link
Contributor

@dmtrKovalenko dmtrKovalenko commented Oct 22, 2020

User facing changelog

Overall changing is related to webpack v5 for instance error messages were changed from

Webpack Compilation Error
.<path>/_test-output/imports_nonexistent_file_spec.js
Module not found: Error: Can't resolve './does/not-exist' in '<path>/_test-output'
Looked for and couldn't find the file at the following paths:
[<path>/_test-output/does/not-exist]
[<path>/_test-output/does/not-exist.wasm]
[<path>/_test-output/does/not-exist.mjs]
[<path>/_test-output/does/not-exist.js]
[<path>/_test-output/does/not-exist.json]
 @ .<path>/_test-output/imports_nonexistent_file_spec.js 1:0-26
`

To the more readable

exports['webpack preprocessor - e2e has less verbose syntax error 1'] = `
Webpack Compilation Error
.<path>/_test-output/syntax_error_spec.js
Module build failed (from /[root]/node_modules/babel-loader/lib/index.js):
SyntaxError: <path>/_test-output/syntax_error_spec.js: Unexpected token (1:18)

�[0m�[31m�[1m>�[22m�[39m�[90m 1 | �[39mdescribe(�[32m'fail'�[39m�[33m,�[39m �[33m-�[39m�[33m>�[39m)�[0m
�[0m �[90m   | �[39m                  �[31m�[1m^�[22m�[39m�[0m
�[0m �[90m 2 | �[39m�[0m

Make sure that [0m�[31m�[1m symbols are used to render the code snippet preview when the error appeared
image

Additional details

This PR proves that @cypress/webpack-preprocessor works nicely with the v5 version of webpack. It also removes the outdated and deleted compiler.plugin API usage.

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 22, 2020

Thanks for taking the time to open a PR!

@dmtrKovalenko dmtrKovalenko changed the title Chore/webpack 5 chore: webpack 5 support Oct 22, 2020
@cypress
Copy link

cypress bot commented Oct 22, 2020



Test summary

8701 0 118 3Flakiness 1


Run details

Project cypress
Status Passed
Commit 77d07fb
Started Nov 9, 2020 6:23 PM
Ended Nov 9, 2020 6:36 PM
Duration 12:34 💡
OS Linux Debian - 10.2
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@dmtrKovalenko
Copy link
Contributor Author

The reason for CI failures is that create-react-app aka react-scripts does not support webpack v5 facebook/create-react-app#9510

@dmtrKovalenko dmtrKovalenko changed the title chore: webpack 5 support feat: webpack 5 support Oct 22, 2020
@JessicaSachs JessicaSachs changed the base branch from develop to master November 9, 2020 18:11
@JessicaSachs
Copy link
Contributor

@dmtrKovalenko there's some failing examples that seem real -- the webpack configuration API has changed. Can you look into it?

@jennifer-shehane
Copy link
Member

Unfortunately we have to close this PR due to inactivity. Please open a new PR addressing the original issue and any requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpack 5 support
3 participants