Skip to content

build: Build with Rolldown#872

Merged
timfish merged 3 commits intogetsentry:mainfrom
timfish:timfish/feat/rolldown-build
Feb 17, 2026
Merged

build: Build with Rolldown#872
timfish merged 3 commits intogetsentry:mainfrom
timfish:timfish/feat/rolldown-build

Conversation

@timfish
Copy link
Collaborator

@timfish timfish commented Feb 11, 2026

Bonuses

  • Rollup v2 no longer in our deps
  • The full CI build is 33% faster
  • Even with TypeScript still building declarations, the build step 2x faster

This PR:

  • Migrates away from Rollup + plugins to Rolldown
  • Removes a load of files that are no longer required
  • Simplifies the build configurations
  • Prebuild script writes the LIB_VERSION to a file so we don't have to replace it at build time
  • Changes CI so that the packages are built once and artifacts are shared to the downstream jobs
    • This is required because Rolldown won't run on the ancient Node versions we test
    • It's much faster to copy the artifacts than to run the build in every job

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Webpack no longer uses unplugin by timfish in #870

Bug Fixes 🐛

  • (webpack) Deduplicate webpack deploys by chargome in #875

Internal Changes 🔧

  • Build with Rolldown by timfish in #872
  • Migrate to oxfmt by timfish in #880
  • Build with Rolldown by timfish in #872
  • Remove unplugin by timfish in #876
  • Rollup/Vite no longer uses unplugin by timfish in #858
  • Esbuild no longer uses unplugin by timfish in #871

🤖 This preview updates automatically when you update the PR.

@timfish timfish force-pushed the timfish/feat/rolldown-build branch from b1bab86 to b6337c2 Compare February 11, 2026 23:07
@timfish timfish force-pushed the timfish/feat/rolldown-build branch from b6337c2 to b8024d5 Compare February 11, 2026 23:17
@timfish timfish marked this pull request as ready for review February 11, 2026 23:20
@timfish timfish requested review from JPeer264, Lms24 and s1gr1d February 11, 2026 23:27
"ts-node": "^10.9.2"
},
"volta": {
"node": "18.20.8",
Copy link
Member

Choose a reason for hiding this comment

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

q: Are there any downsides to upgrade to v22 here? In the JS SDK we use v20, and I'm not sure if we can upgrade that easily (maybe we can)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't see any downside! We just have to be aware that every CI job that doesn't override the Node version will use this.

@JPeer264
Copy link
Member

Also for the record. I'm fine with a RC of rolldown being in here. If there are no issues with it ofc - but I'm not a pro in rolldown either :)

Copy link
Member

@s1gr1d s1gr1d left a comment

Choose a reason for hiding this comment

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

Looks good, I just want to mention this issue here as we could use those filters now: #749

@@ -0,0 +1,22 @@
import modulePackage from "module";
Copy link

Choose a reason for hiding this comment

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

Bug: The Rollup config for bundler-plugin-core doesn't mark Node.js built-in modules as external, which will cause them to be incorrectly bundled and lead to runtime errors.
Severity: HIGH

Suggested Fix

Update the external array in packages/bundler-plugin-core/rollup.config.mjs to include Node.js built-in modules. Change external: Object.keys(packageJson.dependencies) to external: [...Object.keys(packageJson.dependencies), ...modulePackage.builtinModules]. This will correctly mark the built-ins as external, preventing them from being bundled.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/bundler-plugin-core/rollup.config.mjs#L1

Potential issue: The `rollup.config.mjs` for `bundler-plugin-core` fails to list Node.js
built-in modules like `fs`, `os`, `path`, and `crypto` in its `external` configuration.
The package's source code uses these modules. Consequently, Rollup will attempt to
bundle these built-ins instead of treating them as external dependencies. This will lead
to runtime errors when the distributed bundle is consumed by other tools, as the
references to these Node.js modules will not be resolved correctly.

Copy link
Collaborator Author

@timfish timfish Feb 17, 2026

Choose a reason for hiding this comment

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

Total rubbish, Rolldown handles this with the node platform. Here is the build output:

image

@timfish timfish requested a review from chargome February 17, 2026 11:27
@timfish
Copy link
Collaborator Author

timfish commented Feb 17, 2026

I just want to mention this issue here as we could use those filters now: #749

I'm hoping to get more integration tests in place before I tackle this. We don't even test Rolldown yet!

@timfish timfish merged commit 6944cf7 into getsentry:main Feb 17, 2026
27 checks passed
@timfish timfish deleted the timfish/feat/rolldown-build branch February 17, 2026 18:23
@timfish timfish changed the title feat: Build with Rolldown internal: Build with Rolldown Feb 19, 2026
@timfish timfish changed the title internal: Build with Rolldown build: Build with Rolldown Feb 19, 2026
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.

3 participants

Comments