-
Notifications
You must be signed in to change notification settings - Fork 491
feat: upgrade Vite from v5 to v7 #7566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughUpdates pnpm workspace catalog with dependency version upgrades across build tools and core packages, introduces new PrimeUI-related packages and tooling, and adds a defensive check in Vite's proxy bypass handler. Changes
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
🎭 Playwright Test Results⏰ Completed at: 12/16/2025, 08:46:39 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/16/2025, 08:36:45 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.2 MB (baseline 3.25 MB) • 🟢 -45.4 kBMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 992 kB (baseline 992 kB) • 🟢 -190 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 297 kB (baseline 299 kB) • 🟢 -1.92 kBConfiguration panels, inspectors, and settings screens
Status: 15 added / 15 removed UI Components — 184 kB (baseline 184 kB) • 🔴 +39 BReusable component library chunks
Status: 9 added / 9 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 3 added / 3 removed Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 8.45 MB (baseline 8.56 MB) • 🟢 -107 kBExternal libraries and shared vendor chunks
Status: 7 added / 7 removed Other — 3.41 MB (baseline 3.75 MB) • 🟢 -345 kBBundles that do not match a named category
Status: 51 added / 51 removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
pnpm-workspace.yaml(4 hunks)vite.config.mts(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Use Vite for fast development and building
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Use Vite for fast development and building
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Imports must be sorted and grouped by plugin; run `pnpm format` before committing
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Use Vite for fast development and building
Applied to files:
pnpm-workspace.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: deploy-and-comment
- GitHub Check: test
- GitHub Check: setup
- GitHub Check: lint-and-format
- GitHub Check: collect
🔇 Additional comments (4)
vite.config.mts (1)
173-174: Necessary guard for WebSocket upgrade requests.The
resparameter isundefinedwhen handling WebSocket upgrade requests, so this check prevents NPEs when accessingres.end()andres.setHeader()on non-HTTP requests. Returningnullallows normal proxy behavior to proceed.pnpm-workspace.yaml (3)
40-40: Verify @vitejs/plugin-vue v6 peer dependency compatibility with Vite 7.The plugin has been upgraded from v5 to v6. Check the package.json peer dependencies for @vitejs/plugin-vue to confirm explicit support for Vite 7, as some Vite plugins have required peer dependency updates for Vite 7 compatibility. Vue 3.5.13 support should be unaffected.
97-97: Verify vite-plugin-vue-devtools v8 Vite 7 compatibility.v8.0.0 dropped support for Vite < 6 and addressed vite-plugin-inspect dependency issues from v7, but recent issues with v8.0.3 suggest runtime stability concerns remain with Vite 7. Consider testing thoroughly in your environment or checking the latest issue tracker for any reported incompatibilities.
14-97: Ensure all tests pass with the upgraded dependencies before merging.The project has comprehensive test coverage (370+ unit tests, browser tests across chromium/firefox/webkit, and quality gates for lint/typecheck/knip). Before this PR merges, run
pnpm test:unitandpnpm test:browserlocally to confirm all tests pass with the upgraded build tooling (@nx/*,vite,vitest,storybook,typescript,tailwindcss, etc.), then verify quality gates pass withpnpm lint,pnpm typecheck, andpnpm knip.
| '@nx/eslint': 22.2.6 | ||
| '@nx/playwright': 22.2.6 | ||
| '@nx/storybook': 22.2.4 | ||
| '@nx/vite': 21.4.1 | ||
| '@nx/vite': 22.2.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Search for Vite version in the repository
fd -t f "pnpm-workspace.yaml|package.json" | head -20 | xargs -I {} sh -c 'echo "=== {} ===" && head -100 {}'Repository: Comfy-Org/ComfyUI_frontend
Length of output: 11956
🏁 Script executed:
cat pnpm-workspace.yaml 2>/dev/null | head -100Repository: Comfy-Org/ComfyUI_frontend
Length of output: 2627
Ensure @nx/vite 22.2.6 supports Vite 7 before deployment.
Repository is currently using @nx/vite 22.2.6 with vite ^7.0.0 and vitest ^3.2.4. GitHub issues document that @nx/vite packages have peer dependency conflicts with Vite v7. Verify that the @nx/vite v22.2.6 peerDependencies explicitly support Vite 7 to prevent build failures or peer dependency resolution warnings during installation.
🤖 Prompt for AI Agents
In pnpm-workspace.yaml around lines 14-17, verify that the pinned @nx/vite
22.2.6 actually lists Vite ^7 (or a range that includes v7) in its
peerDependencies; if it does not, update the dependency resolution by either
upgrading @nx/vite to a release that explicitly supports Vite 7 or add a
pnpm.overrides (or packageManager resolution) entry to force a compatible
@nx/vite version, then run pnpm install and a local build (and run any relevant
tests) to confirm no peer dependency warnings or build failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai Link to those issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
@nx/vite Vite 7 peer dependency GitHub issues
💡 Result:
Here are the main GitHub issues I found about @nx/vite and Vite 7 / peer-dependency problems:
- New Angular library generator wrongly adds @nx/vite and vite to peerDependencies (reports Vite added to peerDeps). (github.com) [nrwl/nx #30140]. [1]
- Request for support / conflicts around Vite 6 (and Vitest 3) with @nx/vite (context for upgrade compatibility). (github.com) [nrwl/nx #29695]. [2]
- npm peer/optional dependency warnings observed after upgrading to vite@7 (reports @types/node / peer resolution issues when using vite@7). (github.com) [nrwl/nx #32057]. [3]
- Related upstream: Vite 7 caused peer-dependency breakage for some plugins (example: @tailwindcss/vite peer constraint ^5.2.0 || ^6). Useful for context on ecosystem plugin compatibility with Vite 7. (github.com) [vitejs/vite #20284]. [4]
If you want, I can open each issue and extract key comments/statuses (e.g., whether fixed, workarounds, suggested versions) and give concrete upgrade/workaround steps.
Citations:
- 1: Newly generated @nx/angular:library adds @nx/vite, vite to peerDependencies nrwl/nx#30140
- 2: support of vite@6 & vitest@3 nrwl/nx#29695
- 3: Could not resolve dependency: npm warn peerOptional @types/node@"^20.19.0 || >=22.12.0" from [email protected] nrwl/nx#32057
- 4: Vite 7 incompatible with @tailwindcss/vite due to strict peer dependency (^5.2.0 || ^6) vitejs/vite#20284
@DrJKL, here are the GitHub issues documenting @nx/vite compatibility concerns with Vite 7:
Nx-related issues:
- nrwl/nx#32057 - npm peer/optional dependency warnings after upgrading to vite@7
- nrwl/nx#29695 - Request for Vite 6 and Vitest 3 support with @nx/vite
- nrwl/nx#30140 - Issues with @nx/vite being wrongly added to peerDependencies
Ecosystem context:
- vitejs/vite#20284 - Vite 7 peer-dependency breakage affecting various plugins
The most directly relevant is issue #32057, which reports peer dependency warnings specifically when using vite@7 with @nx packages. Would you like me to investigate the current status of these issues or check if @nx/vite 22.2.6 has resolved these compatibility concerns?
🧠 Learnings used
Learnt from: Myestery
Repo: Comfy-Org/ComfyUI_frontend PR: 7422
File: .github/workflows/pr-update-playwright-expectations.yaml:131-135
Timestamp: 2025-12-12T23:02:37.473Z
Learning: In the `.github/workflows/pr-update-playwright-expectations.yaml` workflow in the Comfy-Org/ComfyUI_frontend repository, the snapshot update process is intentionally scoped to only add and update snapshot images. Deletions of snapshot files are handled explicitly outside this workflow and should not be suggested as part of this automation.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Use Vite for fast development and building
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Use Vite for fast development and building
| unplugin-typegpu: 0.8.0 | ||
| unplugin-vue-components: ^0.28.0 | ||
| vite: ^5.4.19 | ||
| vite: ^7.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review both Vite migration guides before merging.
While Vite 7 should be a smooth update from Vite 6, with only already deprecated features being removed, upgrading from v5 requires following two sequential migration paths. Check the Migration from v5 Guide in the Vite v6 docs first to see the needed changes, and then proceed with the changes for v7. Pay attention to CSS output file name changes in library mode and the new package name-based defaults, plus the requirement for Node.js 20.19+ or 22.12+ as Node.js 18 is no longer supported.
## Summary Update vite to version 7, this is prerequisite to support sparkjs https://sparkjs.dev/ for 3DGS file. Currently, vite 5 has issue to load the file in spark, as working with developer from World lab https://www.worldlabs.ai/, we found it is bug on vite 5, we should upgrade vite to latest one. see Comfy-Org#4061 also discussed with @christian-byrne and got approval for this change ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7566-feat-upgrade-Vite-from-v5-to-v7-2cb6d73d365081f7bdb0d7425d8b869e) by [Unito](https://www.unito.io)
## Summary Update vite to version 7, this is prerequisite to support sparkjs https://sparkjs.dev/ for 3DGS file. Currently, vite 5 has issue to load the file in spark, as working with developer from World lab https://www.worldlabs.ai/, we found it is bug on vite 5, we should upgrade vite to latest one. see #4061 also discussed with @christian-byrne and got approval for this change ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7566-feat-upgrade-Vite-from-v5-to-v7-2cb6d73d365081f7bdb0d7425d8b869e) by [Unito](https://www.unito.io)
Summary
Update vite to version 7, this is prerequisite to support sparkjs https://sparkjs.dev/ for 3DGS file.
Currently, vite 5 has issue to load the file in spark, as working with developer from World lab https://www.worldlabs.ai/, we found it is bug on vite 5, we should upgrade vite to latest one.
see #4061
also discussed with @christian-byrne and got approval for this change
┆Issue is synchronized with this Notion page by Unito