fix(server-utils): Stop orchestrion rollup plugin from crashing under Rolldown - #23545
Open
mkly wants to merge 1 commit into
Open
fix(server-utils): Stop orchestrion rollup plugin from crashing under Rolldown#23545mkly wants to merge 1 commit into
mkly wants to merge 1 commit into
Conversation
… Rolldown The plugin's `buildStart` hook assumed the bundler had normalized `external` into a predicate function by the time the hook runs. Rolldown deliberately omits function-typed options from its normalized options (rolldown/rolldown#1041), so `rollupOptions.external` is `undefined` there for every config shape and calling it crashed the build with "rollupOptions.external is not a function". The plugin now captures the raw `external` value in the `options` hook, which both bundlers invoke with the un-normalized input options. `buildStart` keeps using the normalized predicate when the bundler provides one and probes the captured raw value otherwise, so the externalized-modules warning still fires on Rolldown for string, array, RegExp and function configs. String entries match via the shared `externalEntryMatchesModule`, consistent with the esbuild and webpack plugins. Fixes getsentry#23450
mkly
requested review from
msonnb and
stephanie-anderson
and removed request for
a team
August 24, 2026 17:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(server-utils): Stop orchestrion rollup plugin from crashing under Rolldown
The plugin's
buildStarthook assumed the bundler had normalizedexternalinto a predicate function by the time the hook runs. Rolldown deliberately omits function-typed options from its normalized options (rolldown/rolldown#1041), sorollupOptions.externalisundefinedthere for every config shape and calling it crashed the build with "rollupOptions.external is not a function".The plugin now captures the raw
externalvalue in theoptionshook, which both bundlers invoke with the un-normalized input options.buildStartkeeps using the normalized predicate when the bundler provides one and probes the captured raw value otherwise, so the externalized-modules warning still fires on Rolldown for string, array, RegExp and function configs. String entries match via the sharedexternalEntryMatchesModule, consistent with the esbuild and webpack plugins.Fixes #23450
yarn lint) & (yarn test).Closes #23450