Used to configure the decorators syntax.
'legacy' | '2022-03'
'legacy'
Specify the decorator syntax version to be used.
Rsbuild uses legacy syntax by default (Stage 1 proposal), equivalent to TypeScript's experimentalDecorators: true
.
Reference documentation:
2022-03
corresponds to the Stage 3 decorator proposal, equivalent to the decorator syntax supported by TypeScript 5.0 by default.
Reference documentation: