File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 44 dirname ,
55 isAbsolute ,
66 join ,
7+ normalize ,
78 relative ,
89 resolve ,
910} from 'node:path' ;
@@ -147,21 +148,14 @@ export async function generateDts(data: DtsGenOptions): Promise<void> {
147148 throw Error ( `Can not set "dts.bundle: true" when "dts.build = true"` ) ;
148149 }
149150
150- console . log (
151- 'rawCompilerOptions.declarationDir: ' ,
152- rawCompilerOptions . declarationDir ,
153- ) ;
154- console . log (
155- 'resolve(dirname(configPath), outDir): ' ,
156- resolve ( dirname ( configPath ) , outDir ) ,
157- ) ;
158151 // can not set '--declarationDir' or '--outDir' when 'build: true'.
159152 if (
160153 ( ! rawCompilerOptions . outDir ||
161- rawCompilerOptions . outDir !== resolve ( dirname ( configPath ) , outDir ) ) &&
154+ normalize ( rawCompilerOptions . outDir ) !==
155+ normalize ( resolve ( dirname ( configPath ) , outDir ) ) ) &&
162156 ( ! rawCompilerOptions . declarationDir ||
163- rawCompilerOptions . declarationDir !==
164- resolve ( dirname ( configPath ) , outDir ) )
157+ normalize ( rawCompilerOptions . declarationDir ) !==
158+ normalize ( resolve ( dirname ( configPath ) , outDir ) ) )
165159 ) {
166160 const info =
167161 rawCompilerOptions . outDir && ! rawCompilerOptions . declarationDir
You can’t perform that action at this time.
0 commit comments