Skip to content
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

Next 12 SWC Support #356

Closed
tpjnorton opened this issue Feb 3, 2022 · 5 comments
Closed

Next 12 SWC Support #356

tpjnorton opened this issue Feb 3, 2022 · 5 comments

Comments

@tpjnorton
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Some of the babel features we need to use decorators aren't supported by SWC yet.

This is the current required babel config:

{
  "plugins": [
    "babel-plugin-transform-typescript-metadata",
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
    "babel-plugin-parameter-decorator",
    // ... other plugins
  ]
}

Describe the solution you'd like
Is there a workaround that'd let us support Next 12?

Describe alternatives you've considered
It's not broken as-is, by any means, we just can't enjoy the benefits of native toolchains yet.

@casperiv0
Copy link
Contributor

probably not the most helpful comment but there's a PR open that is related to this: vercel/next.js#32914.

@sannajammeh
Copy link

yarn add next@canary should resolve this now :)

Keep in mind you'll be installing a pre-release NextJS

@tpjnorton
Copy link
Contributor Author

Amazing! Thanks @sannajammeh for the feature and @Dev-CasperTheGhost for the update 🎉 🚀

@ggurkal ggurkal closed this as completed Feb 8, 2022
@anthonyalayo
Copy link

I tried the above out, but I'm still getting an issue with:

Support for the experimental syntax 'decorators-legacy' isn't currently enabled

Has anyone had a solution to that? Sounds like it's eslint related?

@sannajammeh
Copy link

I tried the above out, but I'm still getting an issue with:

Support for the experimental syntax 'decorators-legacy' isn't currently enabled

Has anyone had a solution to that? Sounds like it's eslint related?

Had a similar issue while working on the PR in for decorator support in Next.js. If my memory serves me right this was an eslint issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants