React refresh not compatible with @babel/preset-flow
See original GitHub issueIf I include @babel/preset-flow
in the webpack-dev-server
example, webpack fails to build it. If I remove hot reloading, webpack succeeds. I’ve created a small reproducible test case here:
https://github.com/michaelgmiller1/react-refresh-webpack-plugin/commits/flow-break
I think this is the last remaining issue for us to adopt React Refresh in our app!! Thanks again for all your work fixing my bug reports!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
babel/preset-react
Though the JSX spec allows this, it is disabled by default since React's JSX does not currently have support for it. pure. boolean...
Read more >Parsing error: Cannot find module '@babel/preset-react'
I have a React project. In the first line in every .js file where I import React, I am getting this error: Parsing...
Read more >How to incrementally add Flow to an existing React app
Let's walk through each step, and then take a look at converting the example components. Install the main dependencies. Alongside Flow itself ...
Read more >@babel/preset-flow | Yarn - Package Manager
Intro. Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain...
Read more >What is @babel/preset-env and why do I need it? - Jakob Lind
This is supported in most browsers but not all, that's why it's a good idea to transpile it ... @babel/preset-env; @babel/preset-flow; @babel/preset-react ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in
0.4.0-beta.8
.The issue is that we don’t parse the file, so we have no idea if there exist a top-of-file comment.
I’ll see if we can work around that without doing string manipulation but it seems difficult at first glance.