From f605e5dfdc26f58380644607f826cae11eed32b5 Mon Sep 17 00:00:00 2001 From: babu-ch Date: Tue, 24 Jun 2025 21:00:53 +0900 Subject: [PATCH] Fix: Adjust stub file paths for accurate resolution during rolldown build --- scripts/rolldown.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/rolldown.ts b/scripts/rolldown.ts index 94feba102..5bcdee9d3 100644 --- a/scripts/rolldown.ts +++ b/scripts/rolldown.ts @@ -323,16 +323,22 @@ export function createConfigsForPackage({ if (rawFile == null) { return } - const stub = stubs[rawFile] + const filename = path.basename(rawFile) + const stub = stubs[`dist/${filename}`] if (!stub) { return } - const filename = path.basename(rawFile) const contents = `export * from './${filename}'` - await fs.writeFile(stub, contents) - // console.log(`created stub ${pc.bold(path.join('packages', target, 'dist', path.basename(stub)))}`) + const fullpath = path.join( + 'packages', + target, + 'dist', + path.basename(stub) + ) + await fs.writeFile(fullpath, contents) + console.log(`created stub ${pc.bold(fullpath)}`) } } ],