Vue Cli 4.0 项目搭建
https://www.yuque.com/docs/share/fdd6795a-10f9-49f9-b509-103d58034e7f?# 《Vue CLI 4.0 项目搭建》
1、选择你需要的配置项
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection) >( ) 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) 测试
2、Use history mode for router? => no
3、css 预处理器:dart-sass 保存后生效
4、选择Eslint代码验证规则
提供一个插件化的javascript代码检测工具,ESLint + Prettier //使用较多
https://www.cnblogs.com/sese/p/11712275.html
5、Element UI框架引入
npm i element-ui -S 安装至生产环境中
6、svg组件引入
https://juejin.cn/post/6844903517564436493