This template should help get you started developing with Vue 3 in Vite.
VSCode + Volar (and disable Vetur).
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.
See Vite Configuration Reference.
pnpm install
pnpm dev
pnpm build
Run Unit Tests with Vitest
pnpm test:unit
Lint with ESLint
pnpm lint
Could not open SomeComponent.vue in the editor.
The editor process exited with an error: spawn code ENOENT.
Launching from the command line
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