diff --git a/.changeset/heavy-pillows-laugh.md b/.changeset/heavy-pillows-laugh.md new file mode 100644 index 00000000000..1ac5eb83331 --- /dev/null +++ b/.changeset/heavy-pillows-laugh.md @@ -0,0 +1,5 @@ +--- +'@module-federation/dts-plugin': patch +--- + +fix: double quote the temp tsconfig path to compatible with Windows. diff --git a/packages/dts-plugin/src/core/lib/typeScriptCompiler.ts b/packages/dts-plugin/src/core/lib/typeScriptCompiler.ts index da9abd61f6a..81ed67d063c 100644 --- a/packages/dts-plugin/src/core/lib/typeScriptCompiler.ts +++ b/packages/dts-plugin/src/core/lib/typeScriptCompiler.ts @@ -212,7 +212,7 @@ export const compileTs = async ( }); const execPromise = util.promisify(exec); const pmExecutable = resolvePackageManagerExecutable(); - const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project '${tempTsConfigJsonPath}'`; + const cmd = `${pmExecutable} ${remoteOptions.compilerInstance} --project "${tempTsConfigJsonPath}"`; try { await execPromise(cmd, { cwd: