Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
4534fd09
Commit
4534fd09
authored
8 years ago
by
Dan Abramov
Committed by
GitHub
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Update Flow instructions (#567)
parent
4185a9d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
template/README.md
+2
-33
template/README.md
with
2 additions
and
33 deletions
+2
-33
template/README.md
+
2
-
33
View file @
4534fd09
...
...
@@ -376,48 +376,17 @@ node_modules/fbjs/lib/Deferred.js.flow:60
node_modules
/
fbjs
/
lib
/
shallowEqual
.
js
.
flow
:
29
29
:
return
x
!==
0
||
1
/
(
x
:
$FlowIssue
)
===
1
/
(
y
:
$FlowIssue
);
^^^^^^^^^^
identifier
`$FlowIssue`
.
Could
not
resolve
name
src
/
App
.
js
:
3
3
:
import
logo
from
'
./logo.svg
'
;
^^^^^^^^^^^^
.
/
logo
.
svg
.
Required
module
not
found
src
/
App
.
js
:
4
4
:
import
'
./App.css
'
;
^^^^^^^^^^^
.
/
App
.
css
.
Required
module
not
found
src
/
index
.
js
:
5
5
:
import
'
./index.css
'
;
^^^^^^^^^^^^^
.
/
index
.
css
.
Required
module
not
found
```
To fix this, change your
`.flowconfig`
to look like this:
```
ini
[libs]
./node_modules/fbjs/flow/lib
[options]
esproposal.class_static_fields
=
enable
esproposal.class_instance_fields
=
enable
module.name_mapper
=
'^\(.*\)\.css$'
-> 'react-scripts/config/flow/css'
module.name_mapper
=
'^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$'
-> 'react-scripts/config/flow/file'
suppress_type
=
$FlowIssue
suppress_type
=
$FlowFixMe
[ignore]
<PROJECT_ROOT>/node_modules/fbjs/.*
```
Re-run flow, and you shouldn’t get any extra issues.
If you later
`eject`
, you’ll need to replace
`react-scripts`
references with the
`<PROJECT_ROOT>`
placeholder, for example:
```
ini
module.name_mapper
=
'^\(.*\)\.css$'
-> '<PROJECT_ROOT>/config/flow/css'
module.name_mapper
=
'^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$'
-> '<PROJECT_ROOT>/config/flow/file'
```
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.
## Adding Custom Environment Variables
>Note: this feature is available with `react-scripts@0.2.3` and higher.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets