Improving development build times

Just had another look back at my dockerfile. I could copy the package.json file I first before the rest. I have it set up so that it would trigger a new install after every file change rather than just a change to package.json, not sure why I changed that. I think because it’s a multi build with no cache, does copying the package.json make a difference in that scenario?

It may help, although because of builds failing now when there is no cache such as on first build, I have to either modify my compose file so that one build happens at a time and the cache is stored or just resort to the cloud.