diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000..341f3e4 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +npx --no-install commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..2da2b37 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run lint:lint-staged diff --git a/package.json b/package.json index 6a38931..43ee51a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", "lint:lint-staged": "lint-staged", "fix": "eslint src --fix", - "prepare": "husky install", + "prepare": "husky", "preinstall": "npx only-allow pnpm" }, "dependencies": { diff --git a/vite.config.ts b/vite.config.ts index 270e17a..ed415fa 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -48,7 +48,7 @@ export default defineConfig(({ mode }) => { } } }, - // https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options + // 依赖预加载 https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options optimizeDeps: { include },