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
Originally, the TypeScript cache gets constantly invalidated, causing build time to increase non-linearly, bloating into minutes for fairly complicated projects.
This commit identified and fixed these problems that caused this problem:
- File version is increased unnecessarily when source hasn't changed.
- Files in node_modules are added incorrectly into LanguageServiceHost.fileNames, since `setSnapshot` is called indirectly for all dependency files discovered when type checking. `fileNames` represents the entry files for this build, so it shouldn't be updating during the process.
- Also creating snapshot when file read in `getScriptSnapshot` is empty (which is still a valid file whatsoever), otherwise it would be marked as 'missing' and invalidate the cache.
0 commit comments