Merge pull request #16636 from thefrontside/keep-custom-exports

Keep custom exports entry points
This commit is contained in:
Patrik Oldsberg
2023-02-28 12:46:43 +01:00
committed by GitHub
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>;