You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

babel-preset-react-app

Package Overview
Dependencies
Maintainers
3
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-react-app - npm Package Compare versions

Comparing version

to
5.0.5-next.9b4009d7

6

create.js

@@ -33,2 +33,7 @@ /**

var isFlowEnabled = validateBoolOption('flow', opts.flow, true);
var isTypeScriptEnabled = validateBoolOption(
'typescript',
opts.typescript,
true
);
var areHelpersEnabled = validateBoolOption('helpers', opts.helpers, true);

@@ -101,2 +106,3 @@ var useAbsoluteRuntime = validateBoolOption(

],
isTypeScriptEnabled && [require('@babel/preset-typescript').default],
].filter(Boolean),

@@ -103,0 +109,0 @@ plugins: [

3

package.json
{
"name": "babel-preset-react-app",
"version": "5.0.4",
"version": "5.0.5-next.9b4009d7",
"description": "Babel preset used by Create React App",

@@ -32,2 +32,3 @@ "repository": "facebook/create-react-app",

"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "7.1.0",
"@babel/runtime": "7.0.0",

@@ -34,0 +35,0 @@ "babel-loader": "8.0.4",

@@ -35,17 +35,20 @@ # babel-preset-react-app

## Usage with Flow
Flow is enabled by default. Make sure you have a `.flowconfig` file at the root directory. You can also use the `flow` option on `.babelrc`:
```
{
"presets": [["react-app", { "flow": true, "typescript": false }]]
}
```
## Usage with TypeScript
To use this package with [`@babel/preset-typescript`](https://www.npmjs.com/package/@babel/preset-typescript), you need to disable `@babel/preset-flow` first.
TypeScript is enabled by default. Make sure you have a `tsconfig.json` file at the root directory. You can also use the `typescript` option on `.babelrc`:
You can achieve this by doing:
```
{
"presets": [
["react-app", {
"flow": false
}],
"@babel/typescript"
]
"presets": [["react-app", { "flow": false, "typescript": true }]]
}
```