-
-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Description
Related plugins
Describe the bug
If a class contains an abstract field, the initializers added by es proposal decorators (the stage 3 one, not experimental decorators) are not getting called.
I have already reported the bug to babel as it is also possible to trigger with babel alone. However, it might be caused by misconfiguration. See here for more info: babel/babel#17541 (comment)
Reproduction
https://github.com/SCLeoX/vite-proposal-decorator-reproduction/blob/main/src/reproduction.ts
Steps to reproduce
Run npm install and then npm run dev. Open webpage and open dev tools. See the initializer is not called. Commenting out the marked line causing the initializer to work normally.
System Info
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 94.92 GB / 127.90 GB
Binaries:
Node: 23.5.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
bun: 1.2.10 - C:\Users\SCucu\.bun\bin\bun.EXE
Deno: 2.3.5 - C:\Users\SCucu\.deno\bin\deno.EXE
Browsers:
Chrome: 140.0.7339.208
Edge: Chromium (140.0.3485.54)
Firefox: 143.0.4 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.19041.5794
npmPackages:
@vitejs/plugin-react: ^5.0.4 => 5.0.4
vite: ^7.1.7 => 7.1.9Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.