【Vite+Vue3+TS】基于Vite+Vue3+TypeScript+ESLint+Prettier+Stylelint搭建项目(亲测超详细)

原文地址:https://blog.csdn.net/aDiaoYa_/article/details/135855366

目 录
项目搭建步骤
确定node版本
使用Vite创建Vue3项目
规范目录结构
配置环境
修改Vite配置文件
集成路由工具Vue Router
集成状态管理工具Pinia
集成CSS预编译器Sass
vite-plugin-svg-icons图标组件
集成UI框架Element Plus
集成HTTP 请求工具 Axios
项目代码规范
集成ESLint配置
集成Prettier配置
解决ESLint与Prettier的冲突
配置husky+lint-staged
集成Stylelint样式的校验
问题及解决
1、vue3 报错解决:找不到模块或其相应的类型声明。(Vue 3 can not find module)
2、Cannot find module 'vue'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?Vetur(2792)
3、Cannot find package 'fast-glob' imported
结合了很多项目和文章,总结一篇项目构建的笔记
温馨提示:文章末尾记录了我在搭建项目过程中,遇到的一些问题和解决办法 ~

 

 

posted @ 2024-02-19 21:37  lizhigang  阅读(217)  评论(0编辑  收藏  举报