Commit e81852c7 authored by Guillermo Rauch's avatar Guillermo Rauch Committed by GitHub

Update README.md

parent af2d78c0
...@@ -477,28 +477,7 @@ module.exports = { ...@@ -477,28 +477,7 @@ module.exports = {
} }
``` ```
#### Default Babel configuration **Note:** Next.js uses Babel 6 out of the box, which doesn't support default `module.exports`. Every time you export a component, make sure you use the ES6 `export` syntax instead.
Next.js uses Babel6 out of the box, which doesn't support default `module.exports`.
##### Invalid:
```js
// bad import
const Link = require('next/link').default;
// bad export
module.exports = () => (
<Link href='/'>Invalid</Link>
)
```
##### Valid:
```js
// good import
import Link from 'next/link';
// good export
export default () => (
<Link href='/'>Valid</Link>
)
```
## Production deployment ## Production deployment
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment