I am trying to move from babel to swc for my NextJS project(NextJS version 13). Here is my bablerc file. I keep getting error "Support for the experimental syntax 'jsx' isn't currently enabled". Is there a guide on the migration somewhere?
{
"presets": [
"next/babel"
],
"plugins": [
[
"react-intl-auto",
{
"removePrefix": "src/",
"filebase": true
}
],
[
"babel-plugin-import",
{
"libraryName": "@mui/material",
"libraryDirectory": "src",
"camel2DashComponentName": false
},
"core"
]
]
}
I created an .swcrc file and it did not help
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true
}
}
}
It tells me Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) to the 'presets' section of your Babel config to enable transformation. But I am not using babel and need to achieve this using SWC