As a novice developer, I dabble in creating applications for personal use. My go-to tools are the Quasar framework for the front end and Python for the back end.
I maintain a git repository where the master
branch houses my "production code," but now I am eager to experiment with the newest version of Quasar that utilizes Vue 3.
My main concern is managing the new dependencies introduced by this upgraded framework.
To bootstrap the framework, I run
quasar create testvue3 --branch next
, which performs various tasks, including installing npm libraries automatically.
These libraries typically reside within the node_modules
folder, which is excluded from version control through .gitignore
.
Now, my question is: when transitioning between the master
and v2
branches (where I plan to re-bootstrap my frontend), how should I handle dependencies?
- Should I include
node_modules
in the repository? - Or execute
npm install
each time I switch branches? - Is there a different approach I should consider?
Note: Although a related post discussing whether the "node_modules" folder should be included in a git repository was recommended, it does not provide specific guidance on managing different branches and ensuring the correct environment and libraries are maintained during transitions.