CLI Service | vue cli service npm
UsingtheBinaryInsideaVueCLIproject,@vue/cli-serviceinstallsabinarynamedvue-cli-service.Youcanaccessthebinarydirectlyasvue-cli-serviceinnpmscripts,oras./node_modules/.bin/vue-cli-servicefromtheterminal.Thisiswhatyouwillseeinthepackage.jsonofaprojectusingthedefaultpreset:{"scripts":{"serve":"vue-cli-serviceserve","build":"vue-cli-servicebuild"}}YoucaninvokethesescriptsusingeithernpmorYarn:Ifyouhavenpx[1]available(shouldbebundledwithanup-to-dateversionofnpm),youcanalsoinvokethebinarydirectlywit...
Using the BinaryInside a Vue CLI project, @vue/cli-service installs a binary named vue-cli-service. You can access the binary directly as vue-cli-service in npm scripts, or as ./node_modules/.bin/vue-cli-service from the terminal.
This is what you will see in the package.json of a project using the default preset:
{ "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build" } }You can invoke these scripts using either npm or Yarn:
If you have npx[1] available (should be bundled with an up-to-date version of npm), you can also invoke the binary directly with:
npx vue-cli-service serveTIP
You can run scripts with additional features using the GUI with the vue ui command.
Here is the Webpack Analyzer from the GUI in action:
vue-cli-service serve Usage: vue-cli-service serve [options] [entry] Options: --open open browser on server start --copy copy url to cl...