This example shows how to use Vitest with Next.js.
Deploy the example using Vercel or preview live with StackBlitz
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example with-vitest with-vitest-app
# or
yarn create next-app --example with-vitest with-vitest-app
# or
pnpm create next-app -- --example with-vitest with-vitest-app
Deploy it to the cloud with Vercel (Documentation).