BillRiess's avatar

Compiled assets

What is the best practice for dealing with compiled assets? Some of the people on my team have mixed opinions on handling compiled JS and CSS files. Should we have public/js/app.js and public/css/app.css in our gitignore along with the mix manifest? This means every developer would need to run npm run dev whenever they run a git pull or checkout. Another approach would be to commit the compiled assets but then we need to ensure we compiled them for production and commit those versions to our release branches. JefferyWay has commented on GitHub that the manifest files should be committed. I know at the end of the day it's whatever works for our team but I would love some feedback to what others are doing.

0 likes
1 reply
Nathan815's avatar

From what I've seen it is a standard practice to not check in compiled assets to source control, and to have devs run npm run dev upon pull/checkout. (Or simply run npm run watch once to compile whenever the files change.)

Source control is meant to store source code. Storing the compiled assets which can easily be several MBs in size will just bloat the repo.

2 likes

Please or to participate in this conversation.