What is the difference between vue create NewProjectsName
and vue init webpack NewProjectsName
commands in vue cli.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With