File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
website/docs/zh/guide/faq Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export default {
9797
9898### 如何在 ` dts.bundle ` 为 ` true ` 时额外排除指定的依赖?
9999
100- Rslib 通过 [ rsbuild-plugin-dts] ( https://github.com/web-infra-dev/rslib/blob/main/packages/plugin-dts/README.md ) 完成对 d.ts 文件的生成,该插件支持通过 [ output.externals] ( /config/rsbuild/output#outputtarget ) 进行配置,用于排除指定的依赖 。
100+ Rslib 通过 [ rsbuild-plugin-dts] ( https://github.com/web-infra-dev/rslib/blob/main/packages/plugin-dts/README.md ) 完成对 d.ts 文件的生成,该插件支持通过 [ output.externals] ( /config/rsbuild/output#outputtarget ) 进行配置,用于从打包后的 d.ts 文件中排除指定的依赖 。
101101
102102举个例子:常见的 React 组件库通常不会将 @types/react 声明在 peerDependencies 中,而是仅声明在 devDependencies,按照 [ autoExternal] ( /config/lib/auto-external ) 处理依赖的逻辑,在打包时 Rslib 会尝试将 @types/react 一同打包进 d.ts 产物中,但在实践中组件库并不应该打包 @types/react 。
103103
You can’t perform that action at this time.
0 commit comments