Blogger Information
Blog 37
fans 0
comment 1
visits 28106
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Vite脚手架 安装
kong
Original
159 people have browsed it

一、Vite 安装

  1. # 1、安装vite脚手架,全局安装
  2. // yarn
  3. yarn global add vite
  4. // npm
  5. npm install -g vite

Vite 创建 Vue 项目

需要选择Vue Router路由

  1. # 1、创建一个项目
  2. npm init vue@latest
  3. # 2、需要安装create-vue@3.3.4吗?
  4. Need to install the following packages:
  5. create-vue@3.3.4
  6. Ok to proceed? (y)
  7. # 3、项目名称
  8. Project name
  9. # 4、是否添加TypeScript
  10. Add TypeScript?
  11. # 5、是否添加JSC支持
  12. # 5.1JSXJavaScript XML,是React发明的一种JavaScript的语法扩展,允许 HTML JavaScript 的混写;JSX本身也是一个表达式,在编译后,JSX表达式会变成普通的JavaScript对象。
  13. Add JSX Support?
  14. # 6、是否为单页应用程序开发添加Vue Router路由管理组件
  15. Add Vue Router for Single Page Application development?
  16. # 7、是否添加Pinia组件来进行状态管理
  17. Add Pinia for state management?
  18. # 8、是否添加Vitest来进行单元测试
  19. Add Vitest for Unit Testing?
  20. # 9、是否添加Cypress来进行单元测试和端到端测试
  21. Add Cypress for both Unit and End-to-End testing?
  22. # 10、是否添加ESLint来进行代码质量检查
  23. Add ESLint for code quality?

运行项目

  1. # 1、进入目录
  2. cd vite
  3. # 2、安装模块
  4. # 2.1yarn
  5. yarn install
  6. # 2.2npm
  7. npm install
  8. # 3、启动项目
  9. # 3.1yarn
  10. yarn dev
  11. # 3.2npm
  12. npm run dev
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!