fix: clear js file cache when next load this file#47
Merged
sxzz merged 2 commits intoantfu-collective:mainfrom Nov 7, 2025
Merged
fix: clear js file cache when next load this file#47sxzz merged 2 commits intoantfu-collective:mainfrom
sxzz merged 2 commits intoantfu-collective:mainfrom
Conversation
4 tasks
Member
|
Is this a bug of jiti? Should we report it to upstream? Since we've already disabled cache for jiti. |
Contributor
Author
I think so. I looked at |
antfu
approved these changes
Nov 7, 2025
Member
|
I don't know if it belongs to jiti, as it's technically not the cache of jiti but the Node's require. In that way, I think I am fine with the solution. |
sxzz
approved these changes
Nov 7, 2025
commit: |
Member
|
Could you please send an issue to jiti as well? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
jitihas a caching issue with JS files, even when the caching is disabled when creating the jiti instance. Please see the failed test case #46.This PR attempts to manually remove all existing caches from the filepath to ensure that the file content is up-to-date on the next load.
/cc @sxzz
Linked Issues
close #46
Additional context