Repository navigation
Description
Describe the bug
I created a new project with vp create using all the defaults
class Foo {
accessor x = 3;
}does not transpile properly causing an "Unexpected identifier 'x'" error in the browser.
I've tried various target="es2025" (and older) configs in both tsconfig, vite.config.ts build target, and build.rolldown.transform.target etc. and have been unable to get this to transpile properly.
Note, that in the tsgo playground, setting the target in tsconfig is enough to work.
https://tsgo.sxzz.dev/#eNplkEFrwzAMhf+K0bmU0bFLxm5jsMHYD4h7MI5SPBwrSEpXCPnvk1NSCj0Z63vvoacZemjaFoaQyl4FdhBzEHEfRG727ItzIUYUIXYX9+aeX+twgeOuBZVIpU+n/a9QMedc1R4iDWPKyD+jJiriobEkI5Vp4BNqHXlAOTwdXjzsNjhQN2XcYMGLCW9QlFNcncoT3sYo36vrsygyjQ+cJn1PfM3sktwndmhVOdQlH2yMQvmMX1bsmr8pqmBZD3C0U0ED1vtsTw6Kovb5g6YPWXD5BwufbjM=
Reproduction
just use vp create
Steps to reproduce
- run
vp createusing all the defaults - add the following snippet to main.ts
class Foo { accessor x = 2; }
vp devto start the server- open in browser and observe the error
Uncaught SyntaxError: Unexpected identifier 'x' (at main.ts?t=1778551827935:7:11)
System Info
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.15.0
Source engines.node
Source Path /home/sorokin/projects/test/package.json
Project Root /home/sorokin/projects/test
Tool Paths:
node /home/sorokin/.vite-plus/js_runtime/node/24.15.0/bin/node
npm /home/sorokin/.vite-plus/js_runtime/node/24.15.0/bin/npm
npx /home/sorokin/.vite-plus/js_runtime/node/24.15.0/bin/npx
VITE+ - The Unified Toolchain for the Web
vp v0.1.20
Local vite-plus:
vite-plus v0.1.20
Tools:
vite v8.0.10
rolldown v1.0.0-rc.17
vitest v4.1.5
oxfmt v0.46.0
oxlint v1.61.0
oxlint-tsgolint v0.22.0
tsdown v0.21.10
Environment:
Package manager pnpm v11.1.0
Node.js v24.15.0 (engines.node)Used Package Manager
pnpm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Effort
Target date
Start date
Activity
naokihaba commentedon May 12, 2026
I've set up a reproduction environment at the link below.
https://github.com/naokihaba/vite-plus-repro-1556
cc @fengmk2. Please let me know if I've misunderstood anything.
As I understand it, while the TC39 decorators proposal including Auto-Accessors is at Stage 3, it's still being fine-tuned. Because the specs aren't fully locked down yet, work is still ongoing for the test262 standard test suite as well.
The Oxc team has decided to hold off on implementing decorators for now because the cost of keeping up with constant changes is so high and they want to avoid ecosystem fragmentation. This seems to be why the accessor keyword is passing through to the browser without being transpiled, which leads to a SyntaxError.