Migrate to vp/vite-plus toolchain and update configs

Replace ESLint/Prettier/Husky workflow with vp (vite-plus) tooling: remove .eslintrc.cjs and prettier.config.js, drop husky pre-commit and add .vite-hooks/pre-commit (vp staged). Update package.json scripts to use vp commands, bump @halo-dev/theme-package-cli, replace vite with @voidzero-dev/vite-plus-core alias and add vite-plus, and add pnpm settings/overrides and packageManager update. Add VS Code recommendations and formatter settings, expose .vscode/settings.json in .gitignore, and adjust CI to use Node 24. Update README link and small formatting fixes. Regenerate pnpm lockfile to reflect dependency changes and other config updates; templates and vite config were also modified.
This commit is contained in:
Ryan Wang
2026-03-24 16:45:04 +08:00
parent c4885a24c9
commit eaaf71a8bf
16 changed files with 1263 additions and 2371 deletions
+18 -3
View File
@@ -1,16 +1,31 @@
import { defineConfig } from "vite";
import { fileURLToPath } from "url";
import path from "path";
import { fileURLToPath } from "url";
import { defineConfig } from "vite-plus";
export default defineConfig({
build: {
outDir: fileURLToPath(new URL("./templates/assets/dist", import.meta.url)),
emptyOutDir: true,
lib: {
entry: path.resolve(__dirname, "src/main.ts"),
entry: path.resolve(process.cwd(), "src/main.ts"),
name: "main",
fileName: "main",
formats: ["iife"],
},
},
lint: { options: { typeAware: true, typeCheck: true } },
fmt: {
printWidth: 100,
tabWidth: 2,
useTabs: false,
endOfLine: "lf",
sortPackageJson: true,
insertFinalNewline: true,
sortImports: {},
ignorePatterns: [],
},
staged: {
"*": ["vp check"],
},
});