Keep custom exports entry points

Signed-off-by: Dmitriy Lazarev <w@kich.dev>
This commit is contained in:
Dmitriy Lazarev
2023-02-28 14:54:46 +04:00
parent dd2ef0cbb4
commit a11b9a23f5
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Keep custom exports entry points in package.json
@@ -186,7 +186,7 @@ async function prepareExportsEntryPoints(
return undefined;
}
const distFiles = await fs.readdir(distPath);
const outputExports = {} as Record<string, Record<string, string>>;
const outputExports = {} as Record<string, string | Record<string, string>>;
const compatibilityWriters = new Array<
(targetDir: string) => Promise<void>
@@ -195,6 +195,7 @@ async function prepareExportsEntryPoints(
const entryPoints = readEntryPoints(pkg);
for (const entryPoint of entryPoints) {
if (!SCRIPT_EXTS.includes(entryPoint.ext)) {
outputExports[entryPoint.mount] = entryPoint.path;
continue;
}
const exp = {} as Record<string, string>;