mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Clean up docs about next/babel (#557)
* Clean up docs about next/babel * Add suggestions from #553
This commit is contained in:
parent
31703d4c78
commit
030a1ed6a9
11
README.md
11
README.md
|
@ -457,8 +457,13 @@ module.exports = {
|
|||
|
||||
### Customizing babel config
|
||||
|
||||
In order to extend our usage of `babel`, you can simply define a `.babelrc` file in the root of your app.
|
||||
If found, we'll use it. Here's an example `.babelrc` file:
|
||||
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.
|
||||
|
||||
This is designed so that you are not surprised by modifications we could make to the babel configurations.
|
||||
|
||||
Here's an example `.babelrc` file:
|
||||
|
||||
```js
|
||||
{
|
||||
|
@ -469,8 +474,6 @@ If found, we'll use it. Here's an example `.babelrc` file:
|
|||
}
|
||||
```
|
||||
|
||||
Although it's not required, you will need to add `next/babel` as a preset. That's the default preset we use for all Next.js apps.
|
||||
|
||||
## Production deployment
|
||||
|
||||
To deploy, instead of running `next`, you probably want to build ahead of time. Therefore, building and starting are separate commands:
|
||||
|
|
Loading…
Reference in a new issue