Skip to content

Migrate MyApp.Client to the Vite+ toolchain - #8

Merged
mythz merged 7 commits into
mainfrom
voidzero
Nov 1, 2026
Merged

mythz merged 7 commits into
mainfrom
voidzero

Conversation

@mythz

@mythz mythz commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Moves the Vue client to Vite+ (vite-plus 1.4.0): Vite 8 (Rolldown), Vitest 5, Oxlint and Oxfmt, with all tool config in vite.config.ts. npm scripts stay the public interface, so dotnet watch, dotnet publish and the .esproj work unchanged.

Vue-specific

  • vue-tsc -b stays in build and check ("check": "vp check && vue-tsc -b"), since vp check's TypeScript Go type checker skips .vue SFCs. Planted type errors are caught by vp check in .ts and by vue-tsc in .vue.
  • TypeScript 6.0, not 7: TS 7 has no compiler API for vue-tsc, so typescript is held back in npm run upgrade.
  • vue-tsc pinned to 3.3.13. npm run build already failed on main with a fresh install: vue-tsc 3.3.14 reports a bogus TS2339 when a component has a static attribute containing // (the NavListItem href="https://..." links in _posts/components). Upstream: vue-tsc 3.3.14: // in a template attribute value produces invalid codegen and breaks dot-value narrowing (TS2339 "Property 'value' does not exist") vuejs/language-tools#6322. Unpin once it's fixed.
  • Oxlint lints .vue <script> blocks (vue plugin); Oxfmt formats SFC templates.
  • Lint/fmt ignore generated files (dtos.ts, components.d.ts, typed-router.d.ts) and markdown content; _posts/components code is still checked.

Dependencies

  • vite-plugin-vue-layouts-next 1.x → 3.x (1.x peers only up to Vite 7; v3 only drops vite-plugin-pages support, unused here)
  • unplugin-vue-markdown kept on 29.x and held back in upgrade: v30 replaces markdown-it, which vite.config.markdown.ts relies on. 29.x works on Vite 8
  • Removed ESLint (the .eslintrc.cjs was never loaded by ESLint 9), npm-run-all2, and the duplicate PostCSS Tailwind setup (.postcssrc.json, @tailwindcss/postcss, postcss, autoprefixer). tailwind.config.ts still applies @tailwindcss/typography via @config

Fixes from the first lint run

  • LiteYouTube appended &undefined to YouTube embed URLs (`&${props.params}` || '' is always truthy)
  • configRouter tested if (loading) on a ref, which is always truthy
  • Unsafe ?. destructure in getRedirect, signout(router: any), wrapper object types, a non-null assertion on an optional chain, useless regex escapes, floating promises, an empty Icons.ts
  • typescript/no-explicit-any is a warning (97 remain), as it was never enforced

Also

  • Seed HelloApi component test with @vue/test-utils (8 tests)
  • CI: a new client job in build.yml; build-container.yml uses voidzero-dev/setup-vp@v1.22.0
  • Docs: Vite+ commands; dtos.ts is regenerated on .NET startup, so npm run dtos is rarely needed
  • MyApp.code-workspace for the Oxc extension; .git-blame-ignore-revs for the Oxfmt commit
  • Also includes LoginPath = "/signin", the AutoUis.vue carousel update, the dtos.ts header and the generated public/api blog metadata

Verified locally

  • npm ci → npm run check, npm run test:run, npm run build pass
  • Dev through .NET: the NodeProxy serves the Vite modules, .vue and .md pages, and /api
  • dotnet publish: the published app (Production) bootstraps an empty DB, serves the hashed assets and the SPA fallback
  • Oxfmt reformat only changes collapsible template whitespace in the built output
  • dist 3.4 → 3.3 MB

Not tested: HMR and rendering in a browser (the browser couldn't reach the dev server), format-on-save in VS Code.

🤖 Generated with Claude Code

mythz and others added 7 commits November 1, 2026 22:38
- vite-plus 1.4.0 (Vite 8 + Rolldown, Vitest 5, Oxlint, Oxfmt) via npm overrides
- lint/fmt/test config in vite.config.ts; `check`, `lint`, `fmt`, `typecheck`, `outdated`, `upgrade` scripts
- replace ESLint (.eslintrc.cjs, never loaded by ESLint 9) and npm-run-all2;
  `typescript/no-explicit-any` is a warning as it was never enforced
- keep `vue-tsc -b` in `build` and `check`: tsgolint doesn't type check .vue SFCs
- TypeScript 6.0 (TS 7 has no compiler API for vue-tsc); vue-tsc pinned to 3.3.13,
  3.3.14 breaks component props next to static attrs containing `//` (vuejs/language-tools#6322)
- vite-plugin-vue-layouts-next 3.x for Vite 8; drop the duplicate PostCSS Tailwind config
- fix lint findings: LiteYouTube appended `&undefined` to embed URLs, `if (loading)` on a ref
  that was always truthy, unsafe optional chaining, `any` router param, wrapper object types,
  non-null assertion on an optional chain, useless regex escapes, floating promises
- seed HelloApi component test with @vue/test-utils
- remove the empty src/_posts/components/Icons.ts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build.yml: new client job (npm run check, vp test run, npm run build); drop unused setup-node from the .NET job
- build-container.yml: voidzero-dev/setup-vp replaces setup-node + npm install
- AGENTS.md / README.md: Vite+ commands, vue-tsc for .vue type checking, held-back upgrades;
  dtos.ts is regenerated on .NET startup, so `npm run dtos` is typically never needed
- MyApp.Client/README.md: replace the obsolete Volar Take Over Mode and ESLint sections
- MyApp.code-workspace: adds MyApp.Client as its own root so the Oxc extension
  resolves the local vite-plus; formats .vue with Oxfmt
- .git-blame-ignore-revs: ignore the Oxfmt formatting commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mythz
mythz merged commit 9d5bd0c into main Nov 1, 2026
4 checks passed
@mythz
mythz deleted the voidzero branch November 1, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant