How react-scripts handles the persistent cache invalidation? #13101
Unanswered
aditya81070
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey team, I was using
webpack-5-react-scripts
before react-scripts officially supported webpack 5 and now migrating to offical react-scripts. While migration I got a question related to caching.The webpack 5 introduced lots of new features and one of them was persistent caching . The persistent caching allows fast rebuilds but it is disable by default because of reasons mentioned in the doc. But we can configure it if we set it up correctly.
Previously I was using following cache and cache invalidation configuration (overriding the cache configuration of react-scripts most probably):
This was using the cache but also setting snapshot settings to content or timestamp based, based on build/local environment.
I went through the webpack configuration of react-scripts and found that we are only using cache configuration but don't have any snapshot settings.
In this case, how react do the cache invalidation ? Also, 🙈 am I understanding the settings of cache + snapshot correctly in terms of react-scripts?
Beta Was this translation helpful? Give feedback.
All reactions