Skip to content

Commit

Permalink
add customization doc (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonybudianto authored Aug 21, 2018
1 parent c5cdfba commit 0fe6c69
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions docs/guide-customization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
id: guide-customization
title: Customization
---

CRA Universal features zero config by default, but you can still override the default config with configuration file.

1. Create `crau.config.js` file in the root of your CRA
2. Here is the starting template
```js
module.exports = {
modifyWebpack: config => config
}
```

## Configurable options
### modifyWebpack
You can override default webpack configuration with this callback.

Example:
```js
modifyWebpack: config => {
const newConfig = {
...config,
entry: './server/app.js'
};
return newConfig;
}
```

> It doesn't assume any merging strategy, so it uses the returned output **directly**
2 changes: 1 addition & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docs": {
"Introduction": ["intro-getting-started"],
"Guides": ["guide-deployment"],
"Guides": ["guide-deployment", "guide-customization"],
"API": []
},
"docs-other": {
Expand Down

0 comments on commit 0fe6c69

Please sign in to comment.