opened 01:31PM - 09 Jan 22 UTC
closed 08:29PM - 10 Jan 22 UTC
support
Currently we have tens or maybe hundreds of react components served from our rai… ls app and we using capistrano for deployments.
we use for sure webpacker for assets compilation and right now this process is really painful as it it takes more than 1.5 hours on a high end machine.
I understand that this is because of the nature of our product, but webpacker right now compiles ALL the assets when there is a small change.
For example if we just add a new file, it recompiles everything from the start.
We looked into caching and found this issue a while ago
https://github.com/rails/webpacker/issues/1439
it means caching and checking for cached compiled files as a default behavior, put looking into the code here and the result of cache
https://github.com/rails/webpacker/pull/1743/files
I can see it only checks the digest of all files, which means if one file is added or one file is changed the whole digest changes and this trigger a complete compilation.
This is my understanding so far if there is something I don't get right please guide me.
I discussed the problem I am facing in this issue, the main issue I believe is that webpacker recompiles everything even if only one file is added, which leads to a lot of unnecessary compile time.
Is there is a way to make it only new or only modified files ?
@karimelghazouly if you switch to shakapacker, updating dependencies, you can open a discussion: Discussions · shakacode/shakapacker · GitHub . Shouldn’t be hard to fix.