Skip to content

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

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

mythz merged 5 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"). vp check's TypeScript Go type checker skips .vue SFCs: a planted type error in HelloApi.vue passed vp check but failed vue-tsc.
  • TypeScript 6.0, not 7. TS 7 has no compiler API for vue-tsc, so typescript is held back in npm run upgrade.
  • Oxlint lints .vue <script> blocks (vue plugin) and Oxfmt formats SFC templates. The reformat leaves the rendered DOM byte-identical.
  • Adds vue-router as a direct dependency (it was only installed through @servicestack/vue), kept on v4 for @servicestack/vue.

Fixes from the first lint run

  • configRouter tested if (loading) on a ref, which is always truthy
  • an untyped template ref cast to any in ShellCommand.vue, an unsafe ?. destructure in getRedirect, signout(router: any), floating promises
  • dropped a dead /src/styles/style.css link from index.html (build warning)

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 (formats .vue on save); .git-blame-ignore-revs for the Oxfmt commit
  • Also updates the AutoUis.vue carousel and the dtos.ts header

Verified locally

  • npm ci → npm run check, npm run test:run, npm run build pass
  • Dev through .NET: pages, API, Identity and SFC HMR work via the NodeProxy
  • dotnet publish: the published app bootstraps an empty DB and renders with no console errors
  • The JS bundle grew 352 → 436 kB from newer @servicestack/vue, not Vite+ (the old Vite 7 setup gives 445 kB on a fresh install)

Not tested: format-on-save in VS Code.

🤖 Generated with Claude Code

mythz and others added 5 commits November 1, 2026 16:37
- 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
- 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), add the vue-router dependency main.ts imports
- fix lint findings: untyped template ref, unsafe optional chaining, `any` router param,
  `if (loading)` on a ref that was always truthy, floating promises
- seed HelloApi component test with @vue/test-utils
- drop the stale /src/styles/style.css link from index.html

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; dtos.ts is
  regenerated on .NET startup, so `npm run dtos` is typically never needed
- 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 c071d9f into main Nov 1, 2026
4 checks passed
@mythz
mythz deleted the voidzero branch November 1, 2026 10:34
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