Skip to content

chore: upgrade non-desktop builds to Vite 8 - #633

Draft
wibus-wee wants to merge 2 commits into
deps/storybook10from
deps/vite8-non-desktop
Draft

chore: upgrade non-desktop builds to Vite 8#633
wibus-wee wants to merge 2 commits into
deps/storybook10from
deps/vite8-non-desktop

Conversation

@wibus-wee

@wibus-wee wibus-wee commented Sep 12, 2026

Copy link
Copy Markdown
Member

Related issue

Same-repository dependency migration; no intake issue required.

Problem / pressure

Vite 8 replaces the build internals with Rolldown and Oxc. The independently buildable CLI, shared components, and review helper can adopt it now, while the desktop build remains constrained by electron-vite@5's Vite 7 peer contract.

Summary

  • Raise the shared Vite catalog to 8.3 and the CLI's directly used esbuild to 0.28.
  • Move the components name-preservation setting to Oxc and use explicit TypeScript config imports.
  • Give the runtime resolver a dedicated tsconfig that excludes type-only React mappings.
  • Keep shared alias helpers structurally typed so Electron's Vite 7 config does not consume Vite 8 implementation types.
  • Leave apps/electron explicitly on Vite 7.

Visual explanation

#630 plugin compatibility
  -> #631 Storybook 10
       -> #633 Vite 8 non-desktop
            |- CLI: Vite 8 / Rolldown, esbuild 0.28 dev builder
            |- components: Vite 8, runtime-only tsconfig paths
            `- review helper: Vite 8 single-file and Storybook builds

Electron: Vite 7 + electron-vite 5 (unchanged boundary)

Before / after

Before After
Shared packages build on Vite 6 CLI, components, and review helper build on Vite 8.3
Components pass type-only React paths into runtime resolution tsconfig.vite.json contains only runtime-safe aliases
Shared helpers export Vite-major-specific alias types Alias helpers expose a stable structural contract
Desktop and shared packages appear coupled to one Vite generation Desktop remains explicitly and type-safely on Vite 7

Test plan

  • pnpm install --lockfile-only --frozen-lockfile --ignore-scripts --offline
  • pnpm --filter @lody/code-review-helper build
  • pnpm --filter @lody/code-review-helper build-storybook
  • pnpm --filter @lody/components build-storybook
  • pnpm --filter lody dev:build
  • pnpm --filter lody build:bundle
  • pnpm --dir apps/cli copy:dsh-presets
  • pnpm --filter lody check:published-bundle-imports
  • Typechecks passed for CLI, components, review helper, and Electron.
  • Full pnpm check passed typecheck and lint, then reached 3,464/3,466 passing component tests under local Node 26; the two storage failures both pass under Node 22.22.0 (18/18 assertions) and are caused by Node 26's global localStorage behavior.
  • pnpm run docs check --base deps/storybook10 reports the same 12 pre-existing broken links into absent submodule files in this nested worktree.

Context handoff

Instructions for reviewing agents

  • Review focus: Check packages/components/tsconfig.vite.json, the two structural alias helpers, and CLI Rolldown output boundaries.
  • Decisions to challenge: Confirm that retaining vite-tsconfig-paths with a runtime-only project is preferable to Vite's native resolver for this package.
  • Plausible failures / evidence gaps: Native Electron Vite 8 is intentionally untested because electron-vite 5 does not support that peer generation.

Authoring context

  • User goal / directives: Upgrade major build dependencies through reviewable GitHub stacked pull requests and identify breaking changes through implementation.
  • Constraints / non-goals: Do not upgrade the desktop Vite generation or Electron runtime in this PR.
  • Risk-bearing decisions: The components runtime resolver deliberately excludes exact React mappings that point at type declarations.
  • Destructive or irreversible behavior: No data migration or destructive behavior; rollback is reverting this stack layer.
  • Deliberately not done or tested: Desktop Vite 8 and signed release packaging remain for the Electron stack.
  • Unknowns / confidence: Local and CI build paths cover the custom workers, WASM, TLA, SSR, and single-file outputs; platform packaging is outside this layer.

Original user prompt

Same-repository maintainer branch; original prompt is not required.

@github-actions

Copy link
Copy Markdown
Contributor

Desktop PR regression failed on commit 0cba539beffdb7f0b0d9d7c61217f42466049960.

Recordings not attached

  • Run evidence: failure-index.json is missing

The Actions artifact retains the complete trace, screenshots, logs, and runtime evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant