Skip to content

Commit 0006b39

Browse files
enero-oalexkrolick
authored andcommitted
Updated babel installation instructions for Flow (#2248)
updated how to install babel presets to use the newer namespace conventions that comes with newer versions of Babel, version 7. My react app kept crashing when I tried installing Flow. I have updated the docs on Flow's documentation, then I saw the same issue here. Here is the PR on Flow's docs just in case - facebook/flow#7856
1 parent 78270c5 commit 0006b39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/docs/static-type-checking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,21 @@ If you manually configured Babel for your project, you will need to install a sp
8888
If you use Yarn, run:
8989

9090
```bash
91-
yarn add --dev babel-preset-flow
91+
yarn add --dev @babel/preset-flow
9292
```
9393

9494
If you use npm, run:
9595

9696
```bash
97-
npm install --save-dev babel-preset-flow
97+
npm install --save-dev @babel/preset-flow
9898
```
9999

100100
Then add the `flow` preset to your [Babel configuration](https://babeljs.io/docs/usage/babelrc/). For example, if you configure Babel through `.babelrc` file, it could look like this:
101101

102102
```js{3}
103103
{
104104
"presets": [
105-
"flow",
105+
"@babel/preset-flow",
106106
"react"
107107
]
108108
}

0 commit comments

Comments
 (0)