Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/plugin-dts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ pluginDts({

Whether to generate declaration files with building the project references. This is equivalent to using the `--build` flag with the `tsc` command. See [Project References](https://www.typescriptlang.org/docs/handbook/project-references.html) for more details.

When project references are configured but the referenced project is not built independently (such as source code development scenarios), this option needs to be enabled to ensure that the declaration files of referenced projects can be generated correctly.

When this option is enabled, you must explicitly set `declarationDir` or `outDir` in `tsconfig.json` in order to meet the build requirements.

### abortOnError
Expand Down
2 changes: 2 additions & 0 deletions website/docs/en/config/lib/dts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ export default {

Whether to generate declaration files with building the project references. This is equivalent to using the `--build` flag with the `tsc` command. See [Project References](https://www.typescriptlang.org/docs/handbook/project-references.html) for more details.

When project references are configured but the referenced project is not built independently (such as source code development scenarios), this option needs to be enabled to ensure that the declaration files of referenced projects can be generated correctly.

::: note

When this option is enabled, you must explicitly set `declarationDir` or `outDir` in `tsconfig.json` in order to meet the build requirements.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/zh/config/lib/dts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ export default {

是否在生成类型声明文件时构建项目的 project references。这相当于在 `tsc` 命令中使用 `--build` 标志。更多详细信息请参考 [项目引用](https://www.typescriptlang.org/docs/handbook/project-references.html)。

在配置了 project references 但被引用的项目未进行独立构建时(例如源码开发场景),需要开启此选项,以确保依赖项目的类型声明文件能够正确生成。

::: note

当启用此选项时,你必须在 `tsconfig.json` 中显式设置 `declarationDir` 或 `outDir` 以满足构建要求。
Expand Down
Loading