Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "vue create NewProjectsName" and "vue init webpack NewProjectsName"?

Tags:

vue.js

What is the difference between vue create NewProjectsName and vue init webpack NewProjectsName commands in vue cli.

like image 615
aswathy Avatar asked Jan 21 '19 14:01

aswathy


People also ask

Does Vue create use Webpack?

Vue CLI is built on top of Webpack and so for beginners, you do not need to know what Webpack is as the Vue CLI has taken care of the configurations with great default presets and you literally need 0 configs to start.

Why Webpack is used in Vue?

Webpack is a module bundler that takes your development assets (like Vue components and plain Javascript files) and combines them into so called bundles. This is different from simply concatenating and minifying JavaScript files. Simply put, with webpack bundles only the modules required on the current page are loaded.

Does Vue need to be compiled?

Installing and running Vue. js (“Vue”) can be done with a script tag that points to the Vue content delivery network (CDN). No build or development process is necessary. But, if you use Vue single-file components (SFCs), you need to convert those files into something the browser can understand.


1 Answers

With the vue create NewProjectName you have more possibilites for configuring the new project you are creating, it let's you decide whether to use the standard options or manually pick what you want (e.g. Babel, TypeScript, PWA support, etc.) - as well as some other options.

vue init webpack is a rather simple, only asks some metadata for the project, if you want to use vue-router, ESLint and unit/e2e tests.

Hope this clears up your question.

like image 150
dfun90 Avatar answered Nov 23 '22 17:11

dfun90