Search code examples
laravelvue.jsnpmgitignorepublic

Should i include /public in Vue.js gitignore?


I have a laravel/Vue.js project, and whenever i commit there are 3 files that get committed too: -public/main.js -public/manifest.js -public/vendor.js

so, Should i include /public in Vue.js gitignore?


Solution

  • It depends on your workflow and project setup:

    • if you are working alone you can build assets locally and upload on production. It will save you space from node_modules on your server
    • if you are working with someone else it is good to be ignored to skip the conflicts on merging (not big deal, but annoying)
    • there is some setups for zero-downtime deploy where each release is in new directory. In this case you don't want node_modules in each release and wait to be build. Then you shouldn't ignore them.
    • the same case will be if you are using some continues integration tool to test frontend