c172d461c8
Documentation / Examples Make sure the linting passes by running pnpm lint The examples guidelines are followed from our contributing doc The Vitest docs state that /// <reference types="vitest" /> is only required when importing defineConfig from vite. |
||
---|---|---|
.. | ||
__tests__ | ||
pages | ||
public | ||
styles | ||
.gitignore | ||
next-env.d.ts | ||
next.config.js | ||
package.json | ||
README.md | ||
tsconfig.json | ||
vitest.config.ts |
Vitest
This example shows how to use Vitest with Next.js.
Deploy your own
Deploy the example using Vercel or preview live with StackBlitz
How to use
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-vitest with-vitest-app
yarn create next-app --example with-vitest with-vitest-app
pnpm create next-app --example with-vitest with-vitest-app
Deploy it to the cloud with Vercel (Documentation).