1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

wrong position of babel config example (#1057)

This commit is contained in:
I am not shine 2017-02-09 11:57:17 -06:00 committed by Tim Neutkens
parent c106a1d02f
commit 97714e8b2a

View file

@ -512,11 +512,6 @@ export default class Error extends React.Component {
### Custom configuration
<p><details>
<summary><b>Examples</b></summary>
<ul><li><a href="./examples/with-custom-babel-config">Custom babel configuration</a></li></ul>
</details></p>
For custom advanced behavior of Next.js, you can create a `next.config.js` in the root of your project directory (next to `pages/` and `package.json`).
Note: `next.config.js` is a regular Node.js module, not a JSON file. It gets used by the Next server and build phases, and not included in the browser build.
@ -551,6 +546,11 @@ module.exports = {
### Customizing babel config
<p><details>
<summary><b>Examples</b></summary>
<ul><li><a href="./examples/with-custom-babel-config">Custom babel configuration</a></li></ul>
</details></p>
In order to extend our usage of `babel`, you can simply define a `.babelrc` file at the root of your app. This file is optional.
If found, we're going to consider it the *source of truth*, therefore it needs to define what next needs as well, which is the `next/babel` preset.