Skip to content

chore(deps): upgrade vite to v8 with required migration#275

Merged
Koosha-Owji merged 3 commits into
mainfrom
feat/vite-8-migration
Apr 20, 2026
Merged

chore(deps): upgrade vite to v8 with required migration#275
Koosha-Owji merged 3 commits into
mainfrom
feat/vite-8-migration

Conversation

@dtoxvanilla1991
Copy link
Copy Markdown
Contributor

@dtoxvanilla1991 dtoxvanilla1991 commented Apr 17, 2026

Summary

Upgrades Vite from v7 to v8 and @vitejs/plugin-react from v5 to v6, with the required migration changes to keep the codebase aligned with the new API.

Changes

  • vite: ^7.0.0^8.0.0 - Vite 8 ships Rolldown as the default bundler.

    • Migrated build.rollupOptionsbuild.rolldownOptions in vite.config.ts (required by Vite 8 / Rolldown).
  • @vitejs/plugin-react: ^5.0.0^6.0.0 - v6 drops Babel and requires Vite 8+.

    • No code changes needed: this repo calls react() with no options, so the removed Babel integration has no effect.

Related PRs

Supersedes / replaces Renovate PRs:

Both are bundled here because @vitejs/plugin-react v6 has a hard peer dependency on vite: "^8.0.0" - they must land together.

@dtoxvanilla1991 dtoxvanilla1991 requested review from a team as code owners April 17, 2026 23:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Walkthrough

Updated the build bundler options configuration key in vite.config.ts from rollupOptions to rolldownOptions, maintaining the same option values for external dependencies, output globals, and warning handler.

Changes

Cohort / File(s) Summary
Build Configuration
vite.config.ts
Updated bundler options key from rollupOptions to rolldownOptions with no changes to the option contents.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: upgrading Vite to v8 and applying the required configuration migration, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the dependency upgrades (Vite v7→v8, @vitejs/plugin-react v5→v6) and documents the required migration change (rollupOptions→rolldownOptions), directly relating to the code changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/vite-8-migration

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 and usage tips.

@dtoxvanilla1991 dtoxvanilla1991 self-assigned this Apr 18, 2026
renovate Bot and others added 2 commits April 18, 2026 23:33
…Vite 8

Vite 8 replaces Rollup with Rolldown as the bundler. The
config key is deprecated in v8 and will be removed in a future version.

Renames  to  to align with the
Vite 8 migration guide:
https://vite.dev/guide/migration#other-related-deprecations
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
vite.config.ts (1)

38-61: Migrate the warning handler from the deprecated onwarn to Rolldown's current onLog API.

build.rolldownOptions is the correct Vite 8 key, but the warning handler still uses onwarn, which is deprecated in Rolldown. Since this PR is already updating to Vite 8/Rolldown, switching to onLog now avoids technical debt later.

♻️ Proposed refactor
-      onwarn(warning, warn) {
+      onLog(level, warning, defaultHandler) {
         // Ignore warnings about react-router-dom being external
         if (
+          level === "warn" &&
           warning.code === "UNRESOLVED_IMPORT" &&
           warning.message?.includes("react-router-dom")
         ) {
           return;
         }
-        warn(warning);
+        defaultHandler(level, warning);
       },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vite.config.ts` around lines 38 - 61, Replace the deprecated onwarn handler
in build.rolldownOptions with Rolldown's onLog API: change onwarn(warning, warn)
to onLog(log, warn) and update references to use log (e.g., log.code and
log.message) instead of warning; keep the same filtering logic (if log.code ===
"UNRESOLVED_IMPORT" && log.message?.includes("react-router-dom") return) and
call the provided warn(log) for all other cases so unresolved-import warnings
for react-router-dom are suppressed while other logs are forwarded.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@vite.config.ts`:
- Around line 38-61: Replace the deprecated onwarn handler in
build.rolldownOptions with Rolldown's onLog API: change onwarn(warning, warn) to
onLog(log, warn) and update references to use log (e.g., log.code and
log.message) instead of warning; keep the same filtering logic (if log.code ===
"UNRESOLVED_IMPORT" && log.message?.includes("react-router-dom") return) and
call the provided warn(log) for all other cases so unresolved-import warnings
for react-router-dom are suppressed while other logs are forwarded.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 966d6d68-37e5-4e6d-b42d-79d7808dfcee

📥 Commits

Reviewing files that changed from the base of the PR and between ab26a76 and b4196ae.

⛔ Files ignored due to path filters (2)
  • package.json is excluded by !**/*.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/*.yaml
📒 Files selected for processing (1)
  • vite.config.ts

@Koosha-Owji Koosha-Owji merged commit 135872a into main Apr 20, 2026
6 checks passed
@Koosha-Owji Koosha-Owji deleted the feat/vite-8-migration branch April 20, 2026 05:47
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.

3 participants