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

Volar 更新到 1.0.10 后配置失效 #4

Closed
4 tasks done
Megasu opened this issue Dec 2, 2022 · 5 comments
Closed
4 tasks done

Volar 更新到 1.0.10 后配置失效 #4

Megasu opened this issue Dec 2, 2022 · 5 comments

Comments

@Megasu
Copy link
Member

Megasu commented Dec 2, 2022

描述问题

Volar Changelog

1.0.10 (2022/11/29)

feat: add nativeTags instead of experimentalRuntimeMode to vueCompilerOptions for uni-app supports (vuejs/language-tools#2065)

解决方案

{
  "compilerOptions": {
    "types": ["@dcloudio/types", "@uni-helper/uni-app-types"]
  },
  "vueCompilerOptions": {
-    "experimentalRuntimeMode": "runtime-uni-app"
+    "nativeTags": []
  },
  "include": ["src/**/*.vue"]
}

复现

复现方案

把 Volar 更新到最新的 v1.0.10 便会出现

Volar Changelog

1.0.10 (2022/11/29)

feat: add nativeTags instead of experimentalRuntimeMode to vueCompilerOptions for uni-app supports (vuejs/language-tools#2065)

解决方案

{
  "compilerOptions": {
    "types": ["@dcloudio/types", "@uni-helper/uni-app-types"]
  },
  "vueCompilerOptions": {
-    "experimentalRuntimeMode": "runtime-uni-app"
+    "nativeTags": []
  },
  "include": ["src/**/*.vue"]
}

系统信息

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz
    Memory: 4.08 GB / 15.79 GB
  Binaries:
    Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.1.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (107.0.1418.56)
    Internet Explorer: 11.0.22000.120
Volar    1.0.10
vue-tsc  1.0.10

使用的包管理器

pnpm

核对

  • 遵循我们的 行为准则
  • 检查是否已经有一个报告相同错误的问题,以避免重复创建。
  • 这是一个具体的错误。请开启 GitHub 讨论你的疑问。
  • 所提供的复现是这个问题的 最小复现
@ModyQyW
Copy link
Member

ModyQyW commented Dec 2, 2022

感谢你的指出!

直接移除 "experimentalRuntimeMode": "runtime-uni-app" 可能会导致锁定 Volarvue-tsc 到 1.0.9 的项目类型提示错误。直接设置 nativeTags 为空数组也可能会影响一些元素,比如 slot

我会尽快更新文档并添加指引。

@ModyQyW
Copy link
Member

ModyQyW commented Dec 2, 2022

先等待 vuejs/language-tools#2165 的回复

@ModyQyW
Copy link
Member

ModyQyW commented Dec 2, 2022

vuejs/language-tools#2165 (comment)

晚一点发一个 v0.2.0

@ModyQyW
Copy link
Member

ModyQyW commented Dec 2, 2022

v0.2.0 已经发布,请阅读 README 并调整。再次感谢你指出了这个问题。❤

@ModyQyW ModyQyW closed this as completed Dec 2, 2022
@Megasu
Copy link
Member Author

Megasu commented Dec 5, 2022

作者更新很及时,再次感谢。❤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants