-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore babel.config.js instead of .babelrc
- Loading branch information
1 parent
5802291
commit fc74a46
Showing
2 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Babel configuration for Next.js | ||
* | ||
* The official documentation uses a ".babelrc" file, but we prefer using "babel.config.js" for better documentation support. | ||
* | ||
* @see https://nextjs.org/docs/advanced-features/customizing-babel-config Official doc reference v10 | ||
* @see https://github.com/vercel/next.js/blob/canary/packages/next/build/babel/preset.ts You can take a look at this file to learn about the presets included by next/babel. | ||
* @see https://emotion.sh/docs/css-prop##babel-preset Configuring Emotion 11 | ||
* @example https://github.com/vercel/next.js/tree/canary/examples/with-custom-babel-config Next.js official example of customizing Babel | ||
*/ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
"next/babel", | ||
{ | ||
"preset-react": { | ||
"runtime": "automatic", | ||
"importSource": "@emotion/react" | ||
} | ||
} | ||
] | ||
], | ||
plugins: ["@emotion/babel-plugin"], | ||
}; |