Skip to content

Commit cfff409

Browse files
committed
fix(dts): error log of set declarationDir when dts.build is true
1 parent adbd46c commit cfff409

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/plugin-dts/src/dts.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,8 @@ export async function generateDts(data: DtsGenOptions): Promise<void> {
167167
(!rawCompilerOptions.declarationDir ||
168168
normalize(rawCompilerOptions.declarationDir) !== resolvedDtsEmitPath)
169169
) {
170-
const info =
171-
rawCompilerOptions.outDir && !rawCompilerOptions.declarationDir
172-
? 'outDir'
173-
: 'declarationDir';
174170
throw Error(
175-
`Please set ${info}: "${dtsEmitPath}" in ${color.underline(
171+
`Please set "declarationDir": "${dtsEmitPath}" in ${color.underline(
176172
tsconfigPath,
177173
)} to keep it same as "dts.distPath" or "output.distPath.root" field in lib config.`,
178174
);

0 commit comments

Comments
 (0)