-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWC can't parse decorator from inversify.js #2546
Comments
I tried locally, and it worked. |
Thanks ! If it can help when I broke the json file, swc successfully report that the json is broken. Related issue found on Next.js repo : vercel/next.js#30340 |
I was about to link it as well. |
Thanks for your reactivity on this @kdy1 🙏 |
Made vercel/next.js#30382 |
Still seeing this error with next@12.0.1:
.swcrc: {
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
}
}
} The code: import { injectable as Injectable } from 'tsyringe';
@Injectable()
export class IndexPageService { |
@abriginets Unfortunately this issue revealed an other Next.js issue that allowed |
Hope they will enable it again soon. I've seen a lot of messages regarding decorators support at vercel/next.js#30174 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
During compilation, swc crash when parsing file that use inversify
@injectable
decorator.Input code
Config
.swcrc
tsconfig.json
Expected behavior
With the legacy decorator enable, it should compile successfully.
This was my babel config before :
Version
The version of @swc/core: The one included in next@12.0.0
Additionnal context
Inversify is using reflect-metadata as polyfill
The text was updated successfully, but these errors were encountered: