Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReplaced dynamic bundler-option key detection with explicit assignments to both Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
|
View your CI Pipeline Execution ↗ for commit c7ae408
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 3 bumped as dependents. 🟩 Patch bumps
|
Bundle Size Benchmarks
Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/start-plugin-core/src/plugin.ts (1)
248-259: Sound approach for cross-version compatibility.Setting both keys is the correct solution since Vite ignores unknown properties. The inline comment clearly documents the rationale.
Consider extracting the shared input configuration to a variable to reduce duplication:
♻️ Optional: Extract shared input config
+ const clientInput = { input: { main: ENTRY_POINTS.client } } build: { // Set both keys so this works with Vite 7 (rollupOptions) // and Vite 8+ (rolldownOptions). Vite ignores unknown keys. - rollupOptions: { - input: { - main: ENTRY_POINTS.client, - }, - }, - rolldownOptions: { - input: { - main: ENTRY_POINTS.client, - }, - }, + rollupOptions: clientInput, + rolldownOptions: clientInput, outDir: getClientOutputDirectory(viteConfig),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/start-plugin-core/src/plugin.ts` around lines 248 - 259, Duplicate input blocks for rollupOptions and rolldownOptions should be extracted to a shared constant to reduce duplication; create a variable (e.g., sharedInput = { input: { main: ENTRY_POINTS.client } }) and use that variable for both rollupOptions and rolldownOptions in the configuration where rollupOptions and rolldownOptions are currently set so the behavior remains identical while avoiding repeated object literals.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/start-plugin-core/src/plugin.ts`:
- Around line 248-259: Duplicate input blocks for rollupOptions and
rolldownOptions should be extracted to a shared constant to reduce duplication;
create a variable (e.g., sharedInput = { input: { main: ENTRY_POINTS.client } })
and use that variable for both rollupOptions and rolldownOptions in the
configuration where rollupOptions and rolldownOptions are currently set so the
behavior remains identical while avoiding repeated object literals.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b108a33d-6e17-4d0c-aed5-487af926578f
📒 Files selected for processing (3)
.changeset/pretty-fans-eat.mdpackages/start-plugin-core/src/plugin.tspackages/start-plugin-core/src/utils.ts
💤 Files with no reviewable changes (1)
- packages/start-plugin-core/src/utils.ts
Sheraff
left a comment
There was a problem hiding this comment.
LGTM, though i don't have the knowledge to say whether it's ok to use both keys at the same time i trust you on this.
I'm also working on moving the benchmark packages to vite 8.
…deprecation warning
Fixes the SSR benchmark regression from
rollupOptions) and Vite 8 (rolldownOptions) #6955The
bundlerOptionsKeydetection ('rolldownVersion' in vite) evaluated against the plugin's ownviteimport, not the consumer's. In a pnpm workspace,start-plugin-coreresolvesvite@8while the benchmarks resolvevite@7. The plugin setrolldownOptions, but Vite 7 only readsrollupOptions, causingCould not resolve entry module "solid/index.html".Fix: instead of fragile detection logic, simply read/write both
rollupOptionsandrolldownOptions. Vite ignores the key it doesn't understand, so this is safe for both versions.Reported in
rollupOptions) and Vite 8 (rolldownOptions) #6955 (comment)Supersedes
Summary by CodeRabbit
Bug Fixes
Chores