This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
- VS Code + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
npm install -g npm-check-updates
https://www.freecodecamp.org/chinese/news/how-to-update-npm-dependencies/
ncu 查看该项目下所有包的版本对比线上最新的版本
ncu [package 包] | -u 改变 package 中包的版本到最新版本 -u 所有的
Red (显示红色) = major (主版本,或者说是大版本)
Cyan (显示青色) = minor(次要版本)
Green(显示绿色) = patch (补丁版本)
ncu -i 列出所有的升级项目 并且可以单个选择
nuc -i --format group 这个命令将软件包分组并组织成 主版本(major)、次要(minor)和补丁(patch)版本。