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

Create craco devServer preset #21952

Closed
sync-by-unito bot opened this issue May 31, 2022 · 5 comments
Closed

Create craco devServer preset #21952

sync-by-unito bot opened this issue May 31, 2022 · 5 comments
Labels
CT Issue related to component testing

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented May 31, 2022

Support for craco was cut from 10.0. Should be a fast follow but the priority is low.

The devServer for craco is located in @cypress/react/plugins. They are essentially webpack transforms that invoke @cypress/webpack-dev-server with a modified webpack config so as to allow the frameworks webpack config to work with CT testing. These plugins/dev-servers are being internalized inside @cypress/webpack-dev-server. Once the work for https://cypress-io.atlassian.net/browse/UNIFY-1267 is complete, we can lift this code from @cypress/react and add them as transforms to @cypress/webpack-dev-server. The template for how these will be wired up will be established, so it’s mostly a lift and shift.

A new feature of @cypress/webpack-dev-server is the sourcing of webpack dependencies. These transforms will need to wired up such that they provide the information needed to source webpack and html-webpack-plugin so as to ensure we are using the version supplied by the framework if applicable.

All code pulled from @cypress/react should be converted to typescript and system-tests should be added so as to cover all supported versions of the framework. The available options for craco should be audited and be configurable via the “options” API.

The old code inside @cypress/react should be left as is and will be removed in another issue.

See the tech brief for config permutations.

Acceptance Criteria

  • Should move code to @cypress/webpack-dev-server
  • Should be wired up to work with the “Object” API
  • Should have system-tests that cover all supported versions of the framework
  • Should audit and surface dev-server options as part of the “options” API

Resources

Tech Brief

Open Pull Requests

Any PRs needed for review

┆Issue is synchronized with this Jira Task by Unito
┆author: Zach Williams
┆epic: CT Architecture
┆friendlyId: UNIFY-1549
┆priority: Low
┆sprint: Backlog
┆taskType: Task

@sync-by-unito sync-by-unito bot added CT Issue related to component testing jira-migration labels May 31, 2022
@marktnoonan
Copy link
Contributor

Adding to Jun 21 sprint after it was highlighted by @conversaShawn

@rmmanseau
Copy link

any updates on this?

@ngmiduc
Copy link

ngmiduc commented Jan 18, 2023

👍

@ngmiduc
Copy link

ngmiduc commented Jan 18, 2023

Would be nice to have craco supported like in previous versions.!

@lmiller1990
Copy link
Contributor

#22672 for how to do in Cypress 10. There is no specific handler needed now, just grab the config.

This may also become more simple with #25881 when implemented.

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

No branches or pull requests

5 participants