Next.js Discord

Discord Forum

TS5 TC39 ES Decorators not working with Next.JS 13

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
Hi everyone.
So it is stated in the docs that experimentalDecorators are now considered legacy. https://nextjs.org/docs/architecture/nextjs-compiler#legacy-decorators
ES Decorators is the new default. But when I try to use them, I get this error:

Unexpected token `@`. Expected identifier, string literal, numeric literal


Can't find any info of how to solve this.

2 Replies

Transvaal lion
Is there any plan on implementing this feature with SWC?