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

Update Vite examples to v5 #1081

Open
MikeMcC399 opened this issue Nov 17, 2023 · 1 comment
Open

Update Vite examples to v5 #1081

MikeMcC399 opened this issue Nov 17, 2023 · 1 comment
Labels
type: enhancement New feature or request

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Nov 17, 2023

Suggestion

This is an enhancement suggestion to update the following examples, currently using Vite v4, to use Vite v5 (see announcement Vite 5.0 is out! Nov 16, 2023):

Directory Current Vite Version
examples/component-tests 4.5.x
examples/wait-on-vite 4.5.x

Reason

cypress-io/github-action examples should show successful use with latest published version of Vite

Prerequisites

Component Testing example

For examples/component-tests

  • Update @vitejs/plugin-react to minimum v4.2.0 to avoid peer dependency warning regarding Vite v5

  • Rename examples/component-tests/vite.config.js to vite.config.mjs (see Deprecate CJS Node API)

  • Resolve Cypress feature request Support vite v5 for component testing cypress#28347. Without this enhancement to Cypress, npx cypress run --component does successfully run, however it outputs the following warnings:

    The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
    We detected that you have versions of dependencies that are not officially supported:
    
    - `vite`. Expected ^2.0.0 || ^3.0.0 || ^4.0.0, found 5.0.0.
    
    If you're experiencing problems, downgrade dependencies and restart Cypress.
    

E2E example

For examples/wait-on-vite

  • There are no other prerequisites apart from updating Vite to minimum v5.0.0
@MikeMcC399 MikeMcC399 added the type: enhancement New feature or request label Nov 17, 2023
@MikeMcC399
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant