"Disabled SWC as replacement for Babel because of custom Babel configuration"?
See original GitHub issueOne of the big upgrades in Next 12 is use of the fast rust compiler SWC. Is there any way this .babelrc
could be altered or removed while maintaining project functionality?
{
"presets": [
[
"next/babel",
{
"styled-jsx": {
"plugins": ["styled-jsx-plugin-postcss"]
}
}
]
]
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
warn - Disabled SWC as replacement for Babel because of ...
A simple solution would be to remove the .babelrc file and add the following code in the jest.config.js file : // ... transform:...
Read more >swc-disabled - Next.js
When an application has custom Babel configuration Next.js will automatically opt-out of using SWC for compiling JavaScript/Typescript and will fall back to ...
Read more >Why You Should Replace Babel with SWC in Next.js
If a custom Babel configuration file is present within your project, Next.js will automatically switch to your existing Babel configuration. This custom Babel ......
Read more >How I change my compiler from BABEL to SWC in NextJS ...
Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled.
Read more >Why you should use SWC (and not Babel) - LogRocket Blog
In this post, we'll cover the basics of transpilers and we'll compare Babel and SWC based on setup, execution, and speed.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have already spend several days looking for a solution. Currently, there aren’t any solution I’m totally satisfy.
Someone already shared the babel config for SWC support: https://github.com/vercel/next.js/discussions/30174#discussioncomment-1539922
Maybe we should wait Vercel to add support?
I’m totally open for ideas.
@oliverpatrick @andrewschreiber I just remove
styled-jsx-plugin-postcss
and .babelrc. By default, the boilerplate now uses SWC compiler and the warning is now removed: “Disabled SWC as replacement for Babel because of custom Babel configuration”