diff --git a/packages/angular/src/migrations/update-14-5-0/migrate-mfe-to-mf.ts b/packages/angular/src/migrations/update-14-5-0/migrate-mfe-to-mf.ts index 4c5f41bf96226..ce27504ee2558 100644 --- a/packages/angular/src/migrations/update-14-5-0/migrate-mfe-to-mf.ts +++ b/packages/angular/src/migrations/update-14-5-0/migrate-mfe-to-mf.ts @@ -127,15 +127,16 @@ export default async function (tree: Tree) { visitNotIgnoredFiles(tree, '/', (path) => { const pathExtName = extname(path); - let fileContents = tree.read(path, 'utf-8'); - if (pathExtName === '.ts' || pathExtName === '.js') { - fileContents = replaceNrwlAngularMfImport(fileContents); + if (pathExtName !== '.ts' && pathExtName !== '.js') { + return; } + let fileContents = tree.read(path, 'utf-8'); + fileContents = replaceNrwlAngularMfImport(fileContents); + if (pathExtName === '.ts') { // Only TS files can import types and interfaces fileContents = replaceExportedMFETypes(fileContents); - fileContents = renameSetupMfeGeneratorUsages(fileContents); }