File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,10 @@ export const pluginDts = (options: PluginDtsOptions = {}): RsbuildPlugin => ({
113113 const { options : rawCompilerOptions } = tsConfigResult ;
114114 const { declarationDir, outDir, composite, incremental } =
115115 rawCompilerOptions ;
116+ // the priority of dtsEmitPath is dts.distPath > declarationDir > output.distPath.root
117+ // outDir is not considered since in multiple formats, the dts files may not in the same directory as the js files
116118 const dtsEmitPath =
117- options . distPath ??
118- declarationDir ??
119- outDir ??
120- config . output ?. distPath ?. root ;
119+ options . distPath ?? declarationDir ?? config . output ?. distPath ?. root ;
121120
122121 // check whether declarationDir or outDir is outside from current project
123122 warnIfOutside ( cwd , declarationDir , 'declarationDir' ) ;
You can’t perform that action at this time.
0 commit comments