Skip to content

Migration documentation doesn't specify Vite version required. #9646

@AidanDaniel97

Description

@AidanDaniel97

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

I spent some time migrating our tests all the way from Vitest 2 to Vitest 4 and although everything was working in the tests and passing, I had a couple of issues

  1. The vite.config.ts didn't like the test property even with <reference types="vitest/config" />
  2. Upon building the application we had a blank screen with a tslib error in the console.

This seems to be because we are on "vite": "^5.4.8" which is not supported but annoyingly I only spotted this after migrating fully, and then facing issues after building - and the only place I could find this information is on the GitHub repo's [README.md](https://github.com/AidanDaniel97/vitest/blob/main/README.md) and not in the migration guide

I'm happy to submit a PR for this, I think it's a necesarry addition for some clarity on what has changed. It may also be worth doing the same for the Vitest 3 migration guide.

Your Suggestion for Changes

Ideally if we can add warning banner at the top of the migration guide

::: warning Prerequisites
Vitest 4.0 requires **Vite >= 6.0.0** and **Node >= 20.0.0**. 
:::

or more detailed

::: warning Prerequisites
Vitest 4.0 requires **Vite >= 6.0.0** and **Node >= 20.0.0**. Before proceeding
with any other migration steps, ensure your environment meets these requirements.
Running Vitest 4.0 on older versions of Vite or Node is not supported and will
likely result in unexpected errors.
:::

Reproduction

https://vitest.dev/guide/migration.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions