Skip to content

Commit

Permalink
refactor(types): bundle client types (#9966)
Browse files Browse the repository at this point in the history
Patch missed by ryu-cho

related vitejs/vite#9966
  • Loading branch information
tony19 committed Sep 24, 2022
1 parent b0e5769 commit c840035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -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`.

Expand Down

0 comments on commit c840035

Please sign in to comment.