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:
parent
c106a1d02f
commit
97714e8b2a
10
README.md
10
README.md
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue