Commit 0e044828 authored by djskinner's avatar djskinner Committed by Tim Neutkens

Add example of next-plugin composition (#3800)

* Add example of next-plugin composition

* Add require statements to the example
parent 7b975d21
...@@ -1088,6 +1088,21 @@ Some commonly asked for features are available as modules: ...@@ -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>
......
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