Skip to content

Commit

Permalink
Restore babel.config.js instead of .babelrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest committed Jan 10, 2021
1 parent 5802291 commit fc74a46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .babelrc

This file was deleted.

24 changes: 24 additions & 0 deletions babel.config.js
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"],
};

0 comments on commit fc74a46

Please sign in to comment.