|
1 | 1 | # monkey-react-scripts |
2 | | -Monkey react script runner: Customize react-scripts webpack config without ejection or fork |
| 2 | +Monkey react script runner: Customize react-scripts webpack config without eject or fork |
3 | 3 |
|
| 4 | +Many of you want to add small change to your webpack config created by create-react-app. but you don't want to eject. or |
| 5 | +use other scripts like [configurable-react-scripts][configurable-react-scripts] or |
| 6 | +[custom-react-scripts][custom-react-scripts] because of update delay. |
| 7 | + |
| 8 | +With monkey-react-scripts you can use react-scripts configs, but monkey patched one. so you always have updated |
| 9 | +react-scripts. |
| 10 | + |
| 11 | +## ☢ DANGER ☢ |
| 12 | + |
| 13 | +> As [@gaearon](https://github.com/gaearon) mentioned multiple times there, it's not good idea to extend it. From my |
| 14 | +point of view, I'm giving you gun, so try not to shot yourself, because probably nobody will help you. When you modify |
| 15 | +something, be completely sure what you doing! |
| 16 | + |
| 17 | +[source][configurable-react-scripts] |
4 | 18 | ## Usage |
5 | 19 | - use create-react-app and create your project, [more-detail][create-react-app] |
6 | 20 | ``` |
@@ -32,6 +46,11 @@ module.exports = function (webpackConfig, isDevelopment) { |
32 | 46 | } |
33 | 47 | ``` |
34 | 48 |
|
| 49 | +## How it works |
| 50 | +I suggest you see [scripts](scripts) and [bin](bin) folders. (less than 100 line of code) |
| 51 | + |
| 52 | +Note: returned value of `require` function is mutable. so you can mutate that before real build/start script. |
| 53 | + |
35 | 54 | ## Snippets |
36 | 55 | You can use [snippets](snippets/) if you want. |
37 | 56 |
|
@@ -150,6 +169,7 @@ related issues: [#462][462], [#662][662], [#900][900] |
150 | 169 | [create-react-app]: https://github.com/facebookincubator/create-react-app#tldr |
151 | 170 | [webpack-visualizer]: https://github.com/chrisbateman/webpack-visualizer |
152 | 171 | [configurable-react-scripts]: https://github.com/svrcekmichal/configurable-react-scripts |
| 172 | +[custom-react-scripts]: https://github.com/kitze/custom-react-scripts |
153 | 173 |
|
154 | 174 | [107]: https://github.com/facebookincubator/create-react-app/issues/107 |
155 | 175 | [167]: https://github.com/facebookincubator/create-react-app/issues/167 |
|
0 commit comments