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

Add example of next-plugin composition (#3800)

* Add example of next-plugin composition

* Add require statements to the example
This commit is contained in:
djskinner 2018-02-16 09:59:55 +00:00 committed by Tim Neutkens
parent 7b975d2156
commit 0e044828ea

View file

@ -1088,6 +1088,21 @@ Some commonly asked for features are available as modules:
*Warning: The `webpack` function is executed twice, once for the server and once for the client. This allows you to distinguish between client and server configuration using the `isServer` property* *Warning: The `webpack` function is executed twice, once for the server and once for the client. This allows you to distinguish between client and server configuration using the `isServer` property*
Multiple configurations can be combined together with function composition. For example:
```js
const withTypescript = require('@zeit/next-typescript')
const withSass = require('@zeit/next-sass')
module.exports = withTypescript(withSass({
webpack(config, options) {
// Further custom configuration here
return config
}
}))
```
### Customizing babel config ### Customizing babel config
<p><details> <p><details>