Replace @angular/platform-browser-dynamic with @angular/platform-browser
ProprietaryAngular 20 deprecated @angular/platform-browser-dynamic. Replaces platformBrowserDynamic with platformBrowser, platformBrowserDynamicTesting and BrowserDynamicTestingModule with platformBrowserTesting and BrowserTestingModule from @angular/platform-browser/testing, and its VERSION with the one of @angular/core. Outside an Angular CLI or Nx workspace, where no builder adds the JIT compiler, the bootstrap file imports @angular/compiler as the dynamic platform did. JitCompilerFactory and bare or namespace imports of the package are flagged for a hand migration. So are the testing imports of a file that resets the test environment in a project where no source sets it up otherwise, as when jest-preset-angular does, since the file would set it up again on a different platform than that setup's.
org. openrewrite. angular. migration. replace-platform-browser-dynamicmod run . --recipe= org. openrewrite. angular. migration. replace-platform-browser-dynamicInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.