From c840035c3402ca4403f41e3d631d7324f60b6bad Mon Sep 17 00:00:00 2001 From: Tony Trinh Date: Sat, 24 Sep 2022 13:01:55 -0500 Subject: [PATCH] refactor(types): bundle client types (#9966) Patch missed by ryu-cho related vitejs/vite#9966 --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65fb07f..475972f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,7 +218,7 @@ Avoid deps that has large transitive dependencies that results in bloated size c Vite aims to be fully usable as a dependency in a TypeScript project (e.g. it should provide proper typings for VitePress), and also in `vite.config.ts`. This means technically a dependency whose types are exposed needs to be part of `dependencies` instead of `devDependencies`. However, these means we won't be able to bundle it. -To get around this, we inline some of these dependencies' types in `packages/vite/types`. This way we can still expose the typing but bundle the dependency's source code. +To get around this, we inline some of these dependencies' types in `packages/vite/src/dep-types`. This way we can still expose the typing but bundle the dependency's source code. Use `pnpm run check-dist-types` to check bundled types does not rely on types in `devDependencies`. If you are adding `dependencies`, make sure to configure `tsconfig.check.json`.