Skip to content

chore(deps-dev): bump vite from 7.3.3 to 8.2.1 - #1126

Merged
redfish4ktc merged 2 commits into
mainfrom
chore/bump_vite_v8
Aug 7, 2026
Merged

chore(deps-dev): bump vite from 7.3.3 to 8.2.1#1126
redfish4ktc merged 2 commits into
mainfrom
chore/bump_vite_v8

Conversation

@redfish4ktc

@redfish4ktc redfish4ktc commented Aug 7, 2026

Copy link
Copy Markdown
Member

Overview

Bump vite from 7.3.3 to 8.2.1 in the four packages that use it (html, ts-example, ts-example-selected-features, ts-example-without-defaults).

Vite 8 replaces Rollup and esbuild with Rolldown and Oxc, which is a breaking change for the build configuration of the vite examples. Migration follows the official guide.

Configuration migration

  • build.rollupOptions becomes build.rolldownOptions.
  • The object form of output.manualChunks no longer exists. It is replaced by output.codeSplitting.groups, not by output.advancedChunks, which is already deprecated in the Rolldown version bundled with Vite 8.
  • A group captures modules by matching their id, whereas the removed object form matched a package name. Since Vite resolves symlinks to their real path, the ids of @maxgraph/core point to the workspace directory and never to node_modules. A name-based regex would therefore silently produce no maxgraph chunk in this repository. The configurations resolve the package directory instead, which keeps the chunk correct both here and for a standalone consumer.

Two companion bumps, both mandatory

These are not opportunistic updates, the install cannot resolve without them:

  • Storybook 10.1 to 10.5.7 (and the root eslint-plugin-storybook): @storybook/builder-vite@10.1 declares vite: ^5 || ^6 || ^7. Vite 8 support starts at 10.3.
  • @types/node ^18.19.123 to ^24.10.7: Storybook 10.5 pulls an optional vite-plus and vitest@4 peer chain requiring @types/node 20 or later. Version 24 also aligns with the version declared in .nvmrc, which was already inconsistent.

Bundle sizes

The Oxc minifier and Lightning CSS make every example smaller. The chunk size warning limits are meant to sit just above the current size so that a regression is reported, so they are recalibrated:

Example v0.24.0 now limit
ts-example 434.58 kB 428.51 kB 429
ts-example-selected-features 366.37 kB 361.38 kB 362
ts-example-without-defaults 303.7 kB 299.46 kB 300

The ts-example limit was already stale: at v0.24.0 the chunk was 434.58 kB for a limit of 433, so that build was emitting a warning.

Notes

The lockfile is updated surgically, not regenerated. A full regeneration drifts 2530 transitive versions, including @types/react 18.2.58 to 19.2.18. React 19 types drop the global JSX namespace, which breaks the tsc run of the core package through @types/mdx (core sets skipLibCheck: false with no types restriction, so it type-checks every @types package in the tree). Worth knowing before any future full regeneration.

Validation. The full CI suite from CLAUDE.md passes locally: core build, test-check, 498 tests, ts-support, all examples, Storybook build, circular dependencies, check:npm-package and lint.

The chunk size guard was checked to be genuinely live under Rolldown rather than silently ignored: lowering ts-example to 428 does emit Some chunks are larger than 428 kB, while 429 does not, against an actual size of 428.51 kB.

No screenshots: this only changes build tooling and example bundling, with no runtime or rendering behaviour change in the library itself.

Summary by CodeRabbit

  • Build & Performance
    • Updated development tooling, including Vite, Storybook, and TypeScript support packages.
    • Improved example application bundling and code splitting for more efficient builds.
    • Adjusted bundle-size warning thresholds to reflect updated build output.
    • Updated build configuration across example applications for more consistent and reliable development builds.
    • Refined generated bundles to better organize application and library code.

Vite 8 replaces Rollup and esbuild with Rolldown and Oxc, which is a breaking change for the build configuration of
the three vite examples.

Migrate the example configurations:
- `build.rollupOptions` becomes `build.rolldownOptions`.
- The object form of `output.manualChunks` no longer exists. It is replaced by `output.codeSplitting.groups`, and not
  by `output.advancedChunks` which is already deprecated in the Rolldown version bundled with Vite 8.
- A group captures modules by matching their id, whereas the removed object form matched a package name. As Vite
  resolves symlinks to their real path, the ids of `@maxgraph/core` point to the workspace directory and never to
  `node_modules`, so the configurations resolve the package directory instead of matching the package name. This
  keeps the `maxgraph` chunk correct both in this repository and for a standalone consumer.

Two dependencies have to be bumped along with vite, they are not optional:
- Storybook, because `@storybook/builder-vite` only accepts vite 8 from 10.3 onwards.
- `@types/node`, because Storybook 10.5 pulls an optional `vite-plus` and `vitest` peer chain that requires
  `@types/node` 20 or later, which made the install unresolvable with the former `^18` range. Version 24 also aligns
  with the version declared in `.nvmrc`.

The lockfile is updated surgically rather than regenerated. A full regeneration drifts `@types/react` to 19, whose
types drop the global `JSX` namespace, which breaks the `tsc` run of the core package through `@types/mdx`.

Recalibrate the chunk size warning limits, which are meant to sit just above the current size so that a bundle size
regression is reported. The Oxc minifier and Lightning CSS make every example smaller:

| Example | v0.24.0 | now | limit |
| --- | --- | --- | --- |
| ts-example | 434.58 kB | 428.51 kB | 429 |
| ts-example-selected-features | 366.37 kB | 361.38 kB | 362 |
| ts-example-without-defaults | 303.7 kB | 299.46 kB | 300 |

The ts-example limit was already stale: at v0.24.0 the chunk was 434.58 kB for a limit of 433, so that build was
warning.
@redfish4ktc redfish4ktc added dependencies skip-changelog Do not include in Changelog and Release Notes javascript Pull requests that update Javascript code labels Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 29000991-65f2-4a73-8e53-9b5c70776862

📥 Commits

Reviewing files that changed from the base of the PR and between 329792a and bc72333.

📒 Files selected for processing (3)
  • packages/ts-example-selected-features/vite.config.js
  • packages/ts-example-without-defaults/vite.config.js
  • packages/ts-example/vite.config.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/ts-example-without-defaults/vite.config.js
  • packages/ts-example-selected-features/vite.config.js
  • packages/ts-example/vite.config.js

Walkthrough

The pull request updates development dependencies for Vite 8, Storybook 10.5.7, Node.js types, and the Storybook ESLint plugin. Three TypeScript example builds now use Rolldown chunk groups for @maxgraph/core.

Changes

Vite and Rolldown upgrade

Layer / File(s) Summary
Development dependency updates
package.json, packages/html/package.json, packages/ts-example-*/package.json
The manifests update Vite, Storybook, Node.js type definitions, and the Storybook ESLint plugin versions.
Rolldown chunk configuration
packages/ts-example-*/vite.config.js
The example builds resolve the real @maxgraph/core directory and place matching modules in a maxgraph chunk through codeSplitting.groups. Rollup manualChunks configuration was removed, and chunk-size warning limits were reduced.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: upgrading Vite development dependencies from 7.3.3 to 8.2.1.
Description check ✅ Passed The description clearly explains the Vite 8 migration, required dependency updates, bundle changes, validation, and why screenshots are not included.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ee6572ad-b23f-4a5c-a12d-76cec261038f

📥 Commits

Reviewing files that changed from the base of the PR and between afc9aec and 329792a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • package.json
  • packages/html/package.json
  • packages/ts-example-selected-features/package.json
  • packages/ts-example-selected-features/vite.config.js
  • packages/ts-example-without-defaults/package.json
  • packages/ts-example-without-defaults/vite.config.js
  • packages/ts-example/package.json
  • packages/ts-example/vite.config.js

Comment thread packages/ts-example-selected-features/vite.config.js Outdated
`realpathSync` returns native separators on Windows, while Vite normalizes module ids to POSIX ones, so comparing the
two raw values makes the substring matcher fail and the `maxgraph` chunk silently disappear. CI runs on
windows-2022, so this has to hold there too.

Normalize both sides with Vite `normalizePath` rather than only the resolved directory: it is unclear whether
Rolldown reports native or POSIX ids on Windows, and normalizing the id as well makes the comparison correct either
way.

Also match with `startsWith` on a directory ending with a separator instead of a plain substring, so that a sibling
directory such as `packages/core-extra` is no longer captured by the group.
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@redfish4ktc
redfish4ktc merged commit 5c8cf90 into main Aug 7, 2026
14 checks passed
@redfish4ktc
redfish4ktc deleted the chore/bump_vite_v8 branch August 7, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies javascript Pull requests that update Javascript code skip-changelog Do not include in Changelog and Release Notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant