From a5c45cc778c8786e869b81d6599164974afc6081 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Wed, 18 Oct 2023 16:56:08 +0100 Subject: [PATCH] fix(angular): install swc/helpers when generating remote applications (#19686) --- packages/angular/src/generators/remote/remote.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/angular/src/generators/remote/remote.ts b/packages/angular/src/generators/remote/remote.ts index a6e3f5b20299f..0393e14db80e7 100644 --- a/packages/angular/src/generators/remote/remote.ts +++ b/packages/angular/src/generators/remote/remote.ts @@ -1,4 +1,5 @@ import { + addDependenciesToPackageJson, formatFiles, getProjects, runTasksInSerial, @@ -13,6 +14,7 @@ import { setupMf } from '../setup-mf/setup-mf'; import { getInstalledAngularVersionInfo } from '../utils/version-utils'; import { addSsr, findNextAvailablePort } from './lib'; import type { Schema } from './schema'; +import { swcHelpersVersion } from '@nx/js/src/utils/versions'; export async function remote(tree: Tree, options: Schema) { return await remoteInternal(tree, { @@ -76,7 +78,15 @@ export async function remoteInternal(tree: Tree, schema: Schema) { typescriptConfiguration, }); - let installTasks = [appInstallTask]; + const installSwcHelpersTask = addDependenciesToPackageJson( + tree, + {}, + { + '@swc/helpers': swcHelpersVersion, + } + ); + + let installTasks = [appInstallTask, installSwcHelpersTask]; if (options.ssr) { let ssrInstallTask = await addSsr(tree, { appName: remoteProjectName,