File tree 3 files changed +14
-4
lines changed
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ prompt(
130
130
) ;
131
131
132
132
// Add Babel config if there is no local babel config
133
- if ( isLocalBabelExists ( ) ) {
133
+ if ( ! isLocalBabelExists ( ) ) {
134
134
console . log ( ' Adding ' + cyan ( 'Babel' ) + ' preset' ) ;
135
135
appPackage . babel = babelConfig ;
136
136
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
28
28
- [ Using Global Variables] ( #using-global-variables )
29
29
- [ Adding Bootstrap] ( #adding-bootstrap )
30
30
- [ Adding Flow] ( #adding-flow )
31
+ - [ Adding Custom Babel Configuration] ( #adding-custom-babel-configuration )
31
32
- [ Adding Custom Environment Variables] ( #adding-custom-environment-variables )
32
33
- [ Can I Use Decorators?] ( #can-i-use-decorators )
33
34
- [ Integrating with a Node Backend] ( #integrating-with-a-node-backend )
@@ -494,6 +495,18 @@ In the future we plan to integrate it into Create React App even more closely.
494
495
495
496
To learn more about Flow, check out [ its documentation] ( https://flowtype.org/ ) .
496
497
498
+ ## Adding Custom Babel Configuration
499
+
500
+ You can override builtin babel presets and plugins [ via .babelrc or package.json] ( https://babeljs.io/docs/usage/babelrc/ ) .
501
+
502
+ > Note: Don't forget to install babel-preset-react-app and include "react-app" preset into your .babelrc or package.json babel configuration section.
503
+
504
+ ``` js
505
+ {
506
+ " presets" : [" react-app" , " stage-0" ]
507
+ }
508
+ ```
509
+
497
510
## Adding Custom Environment Variables
498
511
499
512
> Note: this feature is available with ` react-scripts@0.2.3 ` and higher.
You can’t perform that action at this time.
0 commit comments