Article Directory
1 Introduction
Use vue --version
View vue install their own version if your version of vue-cli in 3 or more, still want to use vue-cli2, you will need to install a bridging tool.
The vue-cli official website explains it like this: Vue CLI >= 3 uses the same vue command as the previous version, so Vue CLI 2 (vue-cli) is overwritten. If you still need to use the old version of vue init function, you can install a bridging tool globally:
# 安装桥接工具
npm install -g @vue/cli-init
# `vue init` 的运行效果将会跟 `[email protected]` 相同
vue init webpack my-project
2. vue-cli2 initialization project
Use the command vue init webpack 项目名称
blog post was written quite detailed: https://www.cnblogs.com/landuo629/p/12468893.html
3. Project directory structure
Borrow a few pictures from coderwhy teacher
Use npm run build
and npm run dev
execution time code commands:
recommend a blog directory structure vue-cli project presentation