Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughReplaces oxc-minify/oxc-transform with rolldown, elevates rolldown to runtime dependency, and converts several build plugins and config to async with dynamic imports; updates public types to use rolldown equivalents. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
rolldown as dependencyrolldown as dependency
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 78: The package.json lists "rolldown" in dependencies but it is a
build-time tool used only by Nitro's build process (see src/build/rolldown/ and
build plugins) and should be moved to devDependencies; update package.json by
removing "rolldown" from "dependencies" and adding the same version entry under
"devDependencies" (preserve the ^1.0.0-rc.3 version and any optionalPeerDep
usage), then run an install to update lockfile so consumers no longer get
rolldown at runtime.
🧹 Nitpick comments (1)
src/build/plugins/oxc.ts (1)
1-9: AlignMinifyOptionstype import to match the public API source.
OXCOptionsinsrc/types/build.tsusesRolldownMinifyOptionsfromrolldown, but this file importsMinifyOptionsfromrolldown/experimental. To maintain consistency and avoid potential type divergence, import from the stablerolldownexport instead, which is the canonical source for this type.♻️ Suggested alignment
-import type { MinifyOptions } from "rolldown/experimental"; +import type { MinifyOptions } from "rolldown"; import type { OXCOptions } from "nitro/types"; import type { Plugin } from "rollup"; export async function oxc( options: OXCOptions & { sourcemap: boolean; minify: boolean | MinifyOptions } ): Promise<Plugin> {
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/build/rollup/config.ts`:
- Around line 28-29: The code passes an unsupported cwd option to
rolldown.transformSync (cwd: nitro.options.rootDir) with a `@ts-expect-error`;
remove this invalid option and the ts-expect-error and either (a) if path
resolution is required, move/configure the cwd at the InputOptions level used by
rolldown() / build() or (b) configure path resolution within the relevant plugin
instead of passing cwd to transformSync; update usages around transformSync and
nitro.options.rootDir accordingly so no ignored/unsupported options remain.
commit: |
Currently nitro has optional peer dependency on rolldown + oxc-transform (for OpenAPI route meta) and oxc-minify for legacy.
Vite v8 will be having dependency on rolldown, by adding rolldown dependency to nitro:
Important
Current PR depends on
rolldown/experimentalimports. Although i tried to make use of dynamic imports to reduce chance of fatal issues in case of breaking changes, we will be waiting and immediately update to betterrolldown/subpath export when available./cc @TheAlexLichter @nitrojs/vite