Merge pull request #9675 from backstage/rugvip/bbfix

cli: repo backend build
This commit is contained in:
Patrik Oldsberg
2022-02-19 21:24:00 +01:00
committed by GitHub
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fix building of backends with `repo build --all`, where it would previously only work if the build was executed within the backend package.
@@ -35,7 +35,10 @@ export async function buildBackend(options: BuildBackendOptions) {
const pkg = await fs.readJson(resolvePath(targetDir, 'package.json'));
// We build the target package without generating type declarations.
await buildPackage({ outputs: new Set([Output.cjs]) });
await buildPackage({
targetDir: options.targetDir,
outputs: new Set([Output.cjs]),
});
const tmpDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'backstage-bundle'));
try {