Skip to content

SadWood/vue-quick-start-template

Repository files navigation

vue-quick-start-template

This template should help get you started developing with Vue 3 in Vite.

Recommended IDE Setup

VSCode + Volar (and disable Vetur).

Type Support for .vue Imports in TS

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 Volar to make the TypeScript language service aware of .vue types.

Customize configuration

See Vite Configuration Reference.

Project Setup

pnpm install

Compile and Hot-Reload for Development

pnpm dev

Type-Check, Compile and Minify for Production

pnpm build

Run Unit Tests with Vitest

pnpm test:unit

Lint with ESLint

pnpm lint

Solving Guide

Could not open SomeComponent.vue in the editor.
The editor process exited with an error: spawn code ENOENT.

Launching from the command line

Echarts import code generator

TDesign

MessagePlugin, NotifyPlugin, LoadingPlugin, DialogPlugin

hint: The '.husky/commit-msg' hook was ignored because it's not set as executable.
hint: You can disable this warning with git config advice.ignoredHook false.

解决方案:

可能是 Mac OS 下某个 Git 钩子脚本没有设置为可执行文件 运行以下命令,将.husky/commit-msg 脚本设置为可执行文件:

chmod +x .husky/commit-msg

运行以下命令来验证脚本是否已设置为可执行文件:

ls -l .husky/commit-msg

如果你仍然收到相同的警告信息,你可以根据提示禁用该警告,运行以下命令:

git config advice.ignoredHook false