Upgrade XBuilder frontend to Vite 8#2954
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on modernizing the frontend build system for Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request upgrades the frontend from Vite 6 to Vite 8, along with related dependencies like vitest. It also replaces the vite-plugin-vercel with a custom local plugin to support the new toolchain. The changes are well-structured, and the new local plugin is clearly written. I have one suggestion to improve the robustness of the Vite configuration by validating an environment variable to prevent potential runtime issues.
There was a problem hiding this comment.
Pull request overview
Upgrades the spx-gui frontend build toolchain from Vite 6 to Vite 8 (which uses Rolldown instead of Rollup), updates related ecosystem packages, replaces vite-plugin-vercel with a local Vercel output plugin, and removes vite-plugin-vue-devtools.
Changes:
- Upgraded
viteto ^8.0.0,vitestto ^4.1.0, and@vitejs/plugin-vueto ^6.0.5; removedvite-plugin-vercelandvite-plugin-vue-devtools - Added a local
vercel-output-plugin.tsthat generates Vercel Build Output API v3 artifacts, replacing the third-party plugin - Changed
rollupOptionstorolldownOptionsin the build config to match Vite 8's Rolldown bundler, and added a type assertion in the mock file for stricter type checking
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| spx-gui/package.json | Bumped vite, vitest, plugin-vue versions; removed vercel and devtools plugins |
| spx-gui/vite.config.ts | Replaced plugins, moved Vercel config inline, renamed rollupOptions to rolldownOptions |
| spx-gui/vercel-output-plugin.ts | New local plugin generating .vercel/output with config.json and static copy |
| spx-gui/tsconfig.node.json | Added new plugin file to the node tsconfig includes |
| spx-gui/src/models/spx/gen/aigc-mock.ts | Added as typeof this.createTask to preserve generic signature under stricter types |
| spx-gui/package-lock.json | Regenerated lock file reflecting all dependency changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Clean upgrade — the local Vercel output plugin is a solid replacement for the stale |
|
Addressed the correctness concerns from the robot review in e67802b: the local Vercel output plugin now uses safer route-pattern conversion, validates the proxied API base URL when rewrite routes are emitted, narrows cleanup to static output plus config.json, and writes config.json in parallel with the static copy. I also re-ran type-check and a production build after the change. |
close #2953
Summary
spx-guifrom Vite 6 to Vite 8 and update related Vite ecosystem packagesvite-plugin-verceldependency with a local Vercel output plugin compatible with the new toolchainvite-plugin-vue-devtoolsto avoid unnecessary Vite peer dependency warnings during installcreateTaskmock signature sovue-tscpasses againValidation
npm installnpm run lintnpm run test -- --runnpm run type-checknpx vite build --mode production.vercel/output/staticmatchesdist.vercel/output/config.jsonBenchmark
npm run build: current branch average11.80s,devaverage24.61s(52.1%faster, about2.09x)npx vite build --mode production: current branch average3.13s,devaverage14.15s(77.9%faster, about4.52x)Vercel Preview Check
C5NFYW3hw(26c8a37), statusReady, total duration2m 8shttps://builder-bpjhuoqrf-xgo-team.vercel.app/and confirmed it loaded normally2m 40sto2m 47s, this run was about32sto39sfaster2m 5sto2m 10s, the latest run was effectively unchanged rather than another large step down