From 79c2a498a33cb13b3dfe40219ecb500506f36a8a Mon Sep 17 00:00:00 2001 From: Bjorn Lu <34116392+bluwy@users.noreply.github.com> Date: Wed, 27 Oct 2021 01:58:28 +0800 Subject: [PATCH] docs(contributing): add testing nested vite steps (#5429) --- CONTRIBUTING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b26530ed70ed80..2bba1b6f533a56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,20 @@ To development and test the core `vite` package: - Run `pnpm link vite` in another Vite project to use the locally built Vite; - Use the `vite` binary anywhere. + If your project has `vite` as a nested dependency, you can customize the dependency resolution instead depending on the package manager used. For pnpm, add this in your project's root `package.json`: + + ```json + { + "pnpm": { + "overrides": { + "vite": "link:../path/to/vite/packages/vite" + } + } + } + ``` + + And re-run `pnpm install` to link the package. + ## Running Tests Each package under `packages/playground/` contains a `__tests__` directory. The tests are run using [Jest](https://jestjs.io/) + [Playwright](https://playwright.dev/) with custom integrations to make writing tests simple. The detailed setup is inside `jest.config.js` and `scripts/jest*` files.