-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5cdfba
commit 0fe6c69
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters