Skip to content

Commit d2624ad

Browse files
committed
fix(migration): ensure framework shim is added only if detected in the root directory
1 parent 7112e7e commit d2624ad

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/cli/src/migration

packages/cli/src/migration/bin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,10 @@ async function executeMigrationPlan(
863863
if (plan.frameworkShimFrameworks) {
864864
updateMigrationProgress('Adding TypeScript shim');
865865
for (const framework of plan.frameworkShimFrameworks) {
866-
if (!hasFrameworkShim(workspaceInfo.rootDir, framework)) {
866+
if (
867+
detectFramework(workspaceInfo.rootDir).includes(framework) &&
868+
!hasFrameworkShim(workspaceInfo.rootDir, framework)
869+
) {
867870
addFrameworkShim(workspaceInfo.rootDir, framework, report);
868871
}
869872
for (const pkg of workspaceInfo.packages) {

0 commit comments

Comments
 (0)