Thank you Wiktor, we also noticed the strange compilie time increasing in the last months (and even the growth of slug's size), but we didn't dig deeper into the issue and so we didn't realize that it was due to the introduction of webpacker.
We just tried you tweak on Rails 4.2 with webpacker (backported) and it seems to work.
I've seen that there is already a pull request to allow yarn cache on the official heroku/ruby buildpack: let's hope that it gets merged sooner.
Thank you Wiktor, we also noticed the strange compilie time increasing in the last months (and even the growth of slug's size), but we didn't dig deeper into the issue and so we didn't realize that it was due to the introduction of webpacker.
We just tried you tweak on Rails 4.2 with webpacker (backported) and it seems to work.
I've seen that there is already a pull request to allow yarn cache on the official heroku/ruby buildpack: let's hope that it gets merged sooner.
Thank you!
Happy to hear it helped you and you were able to adapt it to your project! Cheers!