Skip to content

rc.3 vitest browser mode issue with tslib #31808

@LeonEck

Description

@LeonEck

Command

test

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

rc.2

Description

In rc.3 when using vitest in browser mode and importing a decorator from a third party library, ng test fails with: TypeError: Cannot destructure property '__extends' of 'import_tslib.default' as it is undefined.
This was not an issue in rc.2

Minimal Reproduction

Minimal reproduction: https://github.com/LeonEck/test-tslib
Running ng test shows the described error.

Exception or Error


Your Environment

Angular CLI       : 21.0.0-rc.3
Angular           : 21.0.0-rc.2
Node.js           : 24.11.1
Package Manager   : npm 11.6.2
Operating System  : darwin arm64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 21.0.0-rc.3       │ ^21.0.0-rc.3      │
│ @angular/cli              │ 21.0.0-rc.3       │ ^21.0.0-rc.3      │
│ @angular/common           │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ @angular/compiler         │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ @angular/compiler-cli     │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ @angular/core             │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ @angular/forms            │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ @angular/platform-browser │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ @angular/router           │ 21.0.0-rc.2       │ ^21.0.0-next.0    │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 5.9.3             │ ~5.9.2            │
│ vitest                    │ 4.0.8             │ ^4.0.8            │
└───────────────────────────┴───────────────────┴───────────────────┘

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions