diff --git a/.changeset/proud-sheep-end.md b/.changeset/proud-sheep-end.md new file mode 100644 index 000000000..f49e25869 --- /dev/null +++ b/.changeset/proud-sheep-end.md @@ -0,0 +1,5 @@ +--- +'@rslib/core': patch +--- + +release diff --git a/packages/plugin-dts/src/tsc.ts b/packages/plugin-dts/src/tsc.ts index f82f28fb0..e4fec391c 100644 --- a/packages/plugin-dts/src/tsc.ts +++ b/packages/plugin-dts/src/tsc.ts @@ -27,7 +27,11 @@ export async function emitDts( const start = Date.now(); const { configPath, declarationDir, name, dtsExtension, banner, footer } = options; - const { options: rawCompilerOptions, fileNames } = loadTsconfig(configPath); + const { + options: rawCompilerOptions, + fileNames, + projectReferences, + } = loadTsconfig(configPath); const compilerOptions = { ...rawCompilerOptions, @@ -40,11 +44,12 @@ export async function emitDts( if (!isWatch) { const host: ts.CompilerHost = ts.createCompilerHost(compilerOptions); - const program: ts.Program = ts.createProgram( - fileNames, - compilerOptions, + const program: ts.Program = ts.createProgram({ + rootNames: fileNames, + options: compilerOptions, + projectReferences, host, - ); + }); const emitResult = program.emit();