Skip to content

feat: build @nuxt/module-builder using rolldown#730

Open
DamianGlowala wants to merge 15 commits into
nuxt:mainfrom
DamianGlowala:feat/rolldown
Open

feat: build @nuxt/module-builder using rolldown#730
DamianGlowala wants to merge 15 commits into
nuxt:mainfrom
DamianGlowala:feat/rolldown

Conversation

@DamianGlowala
Copy link
Copy Markdown
Member

📚 Description

This moves building the Nuxt module builder library itself from unbuild to rolldown. Building userland modules with it using rolldown is the next step.

Co-authored-by: Copilot <copilot@github.com>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/module-builder@730

commit: 53e3d0c

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

📝 Walkthrough

Walkthrough

Removed the default Unbuild export from build.config.ts. Updated package.json scripts to use rolldown -c for build, added build:watch, removed unbuild --stub from dev:prepare, enabled ESLint caching and added lint:fix, and tightened engines.node to >=22.12.0. Added rolldown and rolldown-plugin-dts dependencies. Added rolldown.config.ts exporting a Rolldown config with inputs ./src/cli.ts and ./src/index.ts, Node platform, a bare-imports external pattern, rolldown-plugin-dts() for declarations, and .mjs ESM output naming. Updated .gitignore to include .eslintcache.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: migrating the build system from unbuild to rolldown for @nuxt/module-builder.
Description check ✅ Passed The description is related to the changeset and explains the rationale for the migration from unbuild to rolldown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@rolldown.config.ts`:
- Around line 17-22: Add the missing trailing commas to satisfy the linter: in
the rolldown config object add a trailing comma after the dts() entry inside the
plugins array (plugins: [ dts(), ]) and add a trailing comma after the
entryFileNames property value inside the output object (output: {
entryFileNames: '[name].mjs', }), leaving the existing plugins, dts(), output
and entryFileNames identifiers unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f0c2a97-c234-4eba-9e76-715a4720292e

📥 Commits

Reviewing files that changed from the base of the PR and between cfb45fb and cf23fac.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • build.config.ts
  • package.json
  • rolldown.config.ts
💤 Files with no reviewable changes (1)
  • build.config.ts

Comment thread rolldown.config.ts Outdated
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 30, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedrolldown@​1.0.0951007899100
Addedrolldown-plugin-dts@​0.23.29910010096100

View full report

Comment thread rolldown.config.ts Outdated
Comment on lines +7 to +14
input: Object.fromEntries(
globSync('src/**/*.ts').map(file => [
path.relative('src', file.slice(0, file.length - path.extname(file).length))
.split(path.sep)
.join('/'),
path.resolve(file),
]),
),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should only need cli + index entries, right?

Copy link
Copy Markdown
Member Author

@DamianGlowala DamianGlowala May 1, 2026

Choose a reason for hiding this comment

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

Ideally only these two, but rolldown wasn't bundling dynamic imports for some reason.

This approach aligns with https://rolldown.rs/reference/InputOptions.input#in-depth

LMK if you're aware of a better solution.

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)
package.json (1)

58-59: Move build-only rolldown packages to devDependencies.

rolldown and rolldown-plugin-dts are used exclusively in rolldown.config.ts and have no runtime imports. Keeping them in dependencies unnecessarily increases the install surface for consumers.

Proposed dependency move
   "dependencies": {
@@
-    "rolldown": "^1.0.0-rc.18",
-    "rolldown-plugin-dts": "^0.23.2",
     "tinyglobby": "^0.2.16",
@@
   "devDependencies": {
+    "rolldown": "^1.0.0-rc.18",
+    "rolldown-plugin-dts": "^0.23.2",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 58 - 59, Move the build-only packages "rolldown"
and "rolldown-plugin-dts" from dependencies into devDependencies in
package.json; edit package.json to remove the "rolldown" and
"rolldown-plugin-dts" entries under "dependencies" and add identical version
entries under "devDependencies" (preserving the versions "^1.0.0-rc.18" and
"^0.23.2"), then run an install to verify lockfile updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@package.json`:
- Around line 58-59: Move the build-only packages "rolldown" and
"rolldown-plugin-dts" from dependencies into devDependencies in package.json;
edit package.json to remove the "rolldown" and "rolldown-plugin-dts" entries
under "dependencies" and add identical version entries under "devDependencies"
(preserving the versions "^1.0.0-rc.18" and "^0.23.2"), then run an install to
verify lockfile updates.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d64bff2a-e743-424f-a48f-74b47a353ff0

📥 Commits

Reviewing files that changed from the base of the PR and between cf23fac and b8dd9cf.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • .gitignore
  • package.json
  • rolldown.config.ts
✅ Files skipped from review due to trivial changes (1)
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • rolldown.config.ts

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 92: The package.json engines field currently sets "node" to ">=22.12.0"
but Rolldown 1.0.0 requires Node >=24.12.0; update the engines entry (the "node"
value) to ">=24.12.0" so the package declares the correct minimum Node.js
version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2f8af358-c3b2-4926-a25c-dfb3f1e13da8

📥 Commits

Reviewing files that changed from the base of the PR and between 00f8542 and 53e3d0c.

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

Comment thread package.json
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
"node": ">=22.12.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

rolldown 1.0.0 Node.js version requirements

💡 Result:

Rolldown 1.0.0’s Node.js version requirement (from Rolldown’s official dev documentation) is: Node.js >= 24.12.0 (minimum). It also states that the project requires Node.js and pnpm (for dependency management). [1] Explanation / where this comes from: - The “Setup the project” guide for Rolldown explicitly says: “Install Node.js >= 24.12.0 / 21.2.0” and “Make sure to install and use Node.js version 24.12.0+ (which is the minimum requirement for this project).” [1] Notes: - The docs describe this as the minimum requirement for building/installing Rolldown’s npm package from source/dev environment. They do not provide a separate, different Node.js requirement specifically labeled “rolldown 1.0.0”, but 1.0.x is the stable line and uses the same npm/N-API-RS packaging approach described in the setup guide. [1]

Citations:


Update Node.js engine requirement to >= 24.12.0.

The engine requirement is set to >=22.12.0, but Rolldown 1.0.0 actually requires Node.js >= 24.12.0 according to the official documentation. Update package.json line 92 to reflect the correct minimum version.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 92, The package.json engines field currently sets
"node" to ">=22.12.0" but Rolldown 1.0.0 requires Node >=24.12.0; update the
engines entry (the "node" value) to ">=24.12.0" so the package declares the
correct minimum Node.js version.

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.

2 participants