fix: d.ts may lost if tsconfig changed #702
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复在 tsconfig 变更后,d.ts 文件可能丢失的问题,引发该问题的上下文如下:
解决方案:将 father 持久缓存 key 中的 tsconfig 去掉,缓存失效与否以 path 和 contenthash 为准;另外手动让 tsc 缓存失效,避免用户更新依赖但未删除
node_modules/.cache
的时候出现异常情况这里无需担心缓存错乱的问题,几种带缓存构建的情况:
Close #698