-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rebuilding of all virtual modules on any change for webpack 4 #78
Conversation
Interesting, ln -sf doesn't overwrite previous symbolic link so I haven't tested anything propely... |
So previous fix, which consist of populating Object.keys(virtualFiles).forEach((file) => {
compiler.fileTimestamps.set(file, +virtualFiles[file].stats.mtime);
}); still works for Webpack 4 in development mode and fixes rebuilds.
Looks like Webpack 5 doesn't have I've disabled test for Webpack 3 and 5 until we find a solution. |
Test and fix is skipped for webpack 3 and 5
Awesome, many thanks Kirill! |
Published |
this change seems to break reloading for any file for webpack 5. I've been testing it locally, and rebuilds of the files still happen but they don't make it to the compilation, e.g. the file after the rebuild is still the old code. |
So if you remove this code webpack-virtual-modules/src/index.ts Lines 262 to 268 in 95e79ab
it starts to work normally? Webpack 5 doesn't have |
Can you make reproduction repo ? |
What's the problem this PR addresses?
Test lets us know more about virtual modules getting reloaded and rebuilt.
How did you fix it?
The problem of reloading and rebuilding every virtual module on any change is not fixed yet.