Skip to content

[Bug]: passes TypeScript experimental decorators as-is #2296

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

  1. Open https://stackblitz.com/edit/github-6jajke-stx58g?file=rolldown.config.mjs
  2. npm run build runs automatically.
  3. The output contains experimental decorators as-is.

What is expected?

Either

  • Throw an error that says "experimental decorators are not supported yet"
  • Read the tsconfig and transform experimental decorators to valid JS if enabled

What is actually happening?

Experimental decorators are passes as-is even if it's not a valid JS.

System Info

Stackblitz

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    rolldown: https://pkg.pr.new/rolldown@351d2c7 => 0.13.2

Any additional comments?

Faced this while trying rolldown with Vite.

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions