Skip to content

build.rolldownOptions.preserveEntrySignatures shows incorrect default #23451

Closed

Description

@Denis6902

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

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:

build: {
  rolldownOptions: {
    preserveEntrySignatures: 'exports-only',
  },
}

I understand that build.rolldownOptions is merged with Vite's internal Rolldown options, but it isn't clear that Vite overrides this particular default.

Relevant code:

preserveEntrySignatures: ssr
? 'allow-extension'
: libOptions
? 'strict'
: false,

Your Suggestion for Changes

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.

Reproduction

No response

Steps to reproduce

No response

Activity

  1. added
    documentation
    on Sep 7, 2026
  2. bluwy commented on Sep 9, 2026

    @bluwy
    Member

    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.

  3. locked and limited conversation to collaborators on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions