You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(@angular/build): reuse TS package.json cache when rebuilding
TypeScript 5.6 and higher added functionality that will search for a
`package.json` file for source files that are part of the program (e.g., `.d.ts`)
and within a node modules directory. This can be an expensive tasks especially
considering the large amount of `.d.ts` files within packages. TypeScript supports
using a cache of known `package.json` files to improve the performance of this task.
The Angular CLI will now provide and reuse this cache across rebuilds during watch
mode. This includes the use of `ng serve`.
The performance difference is most apparent for the Angular template diagnostic
step of the build. Internally the Angular compiler creates a new template typechecking
program which causes the `package.json` search process to occur. By leveraging the
cache, this process becomes a series of cache hits. In the event that files are modified
within the node modules directory, the cache is invalidated and the following rebuild
may be longer as a result.
(cherry picked from commit 75998eb)
0 commit comments