You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build.rolldownOptions.preserveEntrySignatures is documented by the underlying Rolldown type with a default value of 'exports-only'.
However, Vite overrides this value internally depending on the build mode. For a regular client build, Vite sets it to false:
preserveEntrySignatures: ssr
? 'allow-extension'
: libOptions
? 'strict'
: false
This means that leaving build.rolldownOptions.preserveEntrySignatures undefined in a regular Vite build does not behave as the documented Rolldown default ('exports-only'), but as false.
This was confusing in my case because I have multiple TypeScript entry points whose exports are consumed as ES modules from a Blazor application. I expected the documented default to preserve those exports, but I need to explicitly set:
I understand that build.rolldownOptions is merged with Vite's internal Rolldown options, but it isn't clear that Vite overrides this particular default.
Document the effective Vite defaults for preserveEntrySignatures, or otherwise mention that Vite overrides Rolldown's default.
For example:
regular client build: false
library build: 'strict'
SSR/server build: 'allow-extension'
It may also be worth considering the IntelliSense/JSDoc experience, since the exposed RolldownOptions type reports Rolldown's 'exports-only' default even though that is not the effective Vite default.
Yeah I think it makes sense to add a small paragraph under the build.rolldownOptions section explaining some of the different Vite defaults. We set a few different defaults right now, but preserveEntrySignatures seem to be the most notable one than we can document it only for now.
Activity
bluwy commentedon Sep 9, 2026
Yeah I think it makes sense to add a small paragraph under the
build.rolldownOptionssection explaining some of the different Vite defaults. We set a few different defaults right now, butpreserveEntrySignaturesseem to be the most notable one than we can document it only for now.