-
Notifications
You must be signed in to change notification settings - Fork 30.4k
Description
What version of Next.js are you using?
11.0.1
What version of Node.js are you using?
12.16.1
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Other platform
Describe the Bug
Before upgrading to Next.js 11, my custom .babelrc file (which sits in the project's root directory) would be picked up by and used. When I booted up the project, I would always receive this message:
However, after upgrading to 11, I no longer get this message when booting up the application and Emotion started complaining about some features that require the usage of their @emotion/babel-plugin which leads me to believe that the Babel custom configuration is not being picked up. I do have a custom server and my .babelrc looks like this:
{
"plugins": ["@emotion/babel-plugin"],
"presets": [
[
"next/babel",
{
"preset-react": {
"runtime": "automatic",
"importSource": "@emotion/react"
}
}
]
],
"env": {
"test": {
"plugins": ["babel-plugin-dynamic-import-node"]
}
}
}
Expected Behavior
Next.js application would pick up the .babelrc file like it's stated in its documentation and like it happened in v10.
To Reproduce
https://stackblitz.com/edit/nextjs-h1ihd3
In here I added a simple custom server that I took directly from your documentation and you can see that the message about the custom .babelrc being picked up, does not appear. You just need to run node server.js in the terminal.
