cli: repo backend build

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-02-19 17:49:07 +01:00
parent c323b2b6af
commit c2f3a548cf
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 {