Repository navigation
Conversation
This was referenced Mar 7, 2025
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.
This is a follow-up of:
Let's consider this scenario:
The loader adds this dynamic file as a dependency:
Webpack behavior
1st run: js files are compiled as expected
2nd run: the dependency is re-created but didn't change, so Webpack doesn't recompile the js files
3rd run: this is surprising, not sure why Webpack doesn't recompile them considering the dependency content changed
Rspack behavior
1st run: js files are compiled as expected
2nd run: the dependency is re-created but didn't change
3rd run: the dependency content changes, so it looks fine to recompile:
How to fix that?
On the 2nd CLI run, I'd like the Rspack compilation to be as fast as the Webpack one.
To me, this is the exact same case as #2, using last modified time instead of file content hash to figure out if a file should be recompiled (v2 case), or if the files that depend on it should be recompiled (v3 case)