New to Vue, and using @vue/cli 4.4.6.
I used Vue CLI to create my project, and noticed that under node_modules/.bin
directory (that Vue CLI created), there is -- amongst many other binaries -- one called vue-cli-service
that appears to be the Vue CLI build tool.
This is a bit strange to me, coming from a predominantly "backend" background using external build tools like Gradle, Maven and SBT, to have the build tool embedded inside a project! I would have expected a scenario where you download vue-cli-service
as a command-line tool (just like I did with vue-cli
) and then direct it at the project you want to build. But this would be like each and every Java project containing a copy of Gradle or Maven itself inside of it! Is this really the intention of a properly-formed Vue project or did I mess something up somehow?
I ask because vue create hello-world
creates a .gitignore
that specifically lists node_modules
in it...
...so aren't these mutually exclusive conventions?
vue create hello-world
creates a "raw" (unbuilt) project that contains node_modules/.bin/vue-cli-service
which appears to be the way to build it. but it also mentions node_modules
in the .gitignore
- so Developer #1 creates a new project and is able to build it, and they push it to a git repo. Since
node_modules
is listed in the .gitignore
, the build tool is not included in the push
- Developer #2 pulls the repo down to work on a new feature branch. But whoops. Since
node_modules/.bin/vue-cli-service
was ignored, they don't have it in their local branch, and so they can't build it.
I know I must be missing something here, I just don't know what it is. Anybody have any ideas?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…