search

Home  >  Q&A  >  body text

What is the difference between "yarn service" and "yarn start" and "yarn build"

I only know that both "yarnserve" and "yarnstart" can get my vue project up and running, but I don't know what the difference is between the two.

All I know about "yarn build" is that it is a "packaging" method, but what is packaging and why do I never use it at work? I usually just upload my code to git and then my backend colleagues can publish it to the web (I have no idea what's going on here. )

(I think my problem description is very clear. Why should I close my question? I have nothing to add)

P粉974462439P粉974462439392 days ago694

reply all(1)I'll reply

  • P粉765684602

    P粉7656846022023-11-03 12:01:57

    yarnserve and yarnstart both run the script defined in package.json (might need more information to be sure.), they perform the same action.

    Packaging means removing all (npm) packages that are not needed in production. It can also run scripts to minimize, obfuscate and compile Javascript or (S)CSS files. In the end, you get a smaller bundle of .js, .css, and .html files that you can host.

    reply
    0
  • Cancelreply