创建vue3.0+element-plus工程

1.全局安装vue-cli@4.5

npm install -g @vue/cli //全局安装vue-cli最新版

2.创建项目

cd D:\workspace//"D:\workspace"替换为自己新建的项目需要放置的文件夹
vue create example_pro //example_pro替换为自己项目名称,名称不支持驼峰式命名

3 选择 >最后一步自定义 Manually select features

 

> ? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection)
(*) Choose Vue version。 // 选择vue版本
(*) Babel //转码器,可以将ES6代码转为ES5代码,从而在现有环境执行。
(*) TypeScript// TypeScript是一个JavaScript(后缀.js)的超集(后缀.ts)包含并扩展了 JavaScript 的语法,需要被编译输出为 JavaScript在浏览器运行,目前较少人再用
( ) Progressive Web App (PWA) Support// 渐进式Web应用程序
(*) Router // vue-router(vue路由)
(*) Vuex // vuex(vue的状态管理模式)
(*) CSS Pre-processors // CSS 预处理器(如:less、sass)
( ) Linter / Formatter // 代码风格检查和格式化(如:ESlint)
( ) Unit Testing // 单元测试(unit tests)
( ) E2E Testing // e2e(end to end) 测试   创建vue3.0+element-plus工程

 

 选择3.x

 

? Use class-style component syntax? Yes 是否使用class风格的组件语法:
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes 是否使用babel做转义
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes 路由器使用历史模式?
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Less 选择一个CSS预处理器
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files 您喜欢在哪里放置Babel、ESLint等的配置。?在专用配置文件中
? Save this as a preset for future projects? No 是否将此保存为将来项目的预设 4.安装element-plus  
vue add element-plus
创建vue3.0+element-plus工程

 

 

 

 

 

上一篇:02.ElementUI源码学习:babel配置


下一篇:从“0”开始搭建Webpack+React 开发环境 (一)