Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复vue3框架选中vite编译工具时依赖冲突 #17312

Merged
merged 5 commits into from
Feb 28, 2025

Conversation

Chef5
Copy link
Contributor

@Chef5 Chef5 commented Feb 12, 2025

这个 PR 做了什么? (简要描述所做更改)

解决官方cli 4.0初始化时,选择vue3+vite时,存在依赖冲突 packages/taro-framework-vue3/package.json

{
"devDependencies": {
    "vite": "^4.2.0",
  },
  "peerDependencies": {
    "@vitejs/plugin-vue": "^5",
    "vite": "^4",
  },
}

@vitejs/plugin-vue 应该和vite统一大版本号,否则会冲突,最小的改动就是将@vitejs/plugin-vue 改为:

"@vitejs/plugin-vue": "^4",

这样vite的最低版本就是v4,如果后续需要统一将vite设置高一点的版本,需要将这3个同时升级。

另外
初始化时,和官方模板还存在一个eslint-plugin-vue的版本冲突:
eslint-config-taro@4.0.9中,packages/eslint-config-taro/package.json:

  "peerDependencies": {
    "eslint-plugin-vue": "^9.17.0"
  }

模板 https://github.com/NervJS/taro-project-templates/blob/v4.0/vue3-NutUI/package.json.tmpl

"eslint-plugin-vue": "^8.0.0",

这个pr也一并调整了,模板项目那边需要改动2处,也是考虑到最小改动,仅将packages/eslint-config-taro中的依赖调整了一下。

这个 PR 是什么类型? (至少选择一个)

这个 PR 涉及以下平台:

  • [✔ ] 所有小程序

This was referenced Feb 15, 2025
@tutuxxx tutuxxx added this to the 4.0.10 milestone Feb 27, 2025
@tutuxxx tutuxxx self-assigned this Feb 27, 2025
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.52%. Comparing base (a600ce4) to head (a540f73).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main   #17312    +/-   ##
========================================
  Coverage   58.52%   58.52%            
========================================
  Files         468      468            
  Lines       27136    27136            
  Branches     5921     5965    +44     
========================================
  Hits        15882    15882            
+ Misses       9907     9778   -129     
- Partials     1347     1476   +129     
Flag Coverage Δ
taro-cli 72.37% <ø> (ø)
taro-runtime 59.87% <ø> (ø)
taro-web 52.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 15 files with indirect coverage changes

@tutuxxx tutuxxx self-requested a review February 28, 2025 06:10
@tutuxxx tutuxxx merged commit 4746529 into NervJS:main Feb 28, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment