flow-babel-webpack-plugin | Flow typecheck status in Webpack build reports | Code Inspection library
kandi X-RAY | flow-babel-webpack-plugin Summary
kandi X-RAY | flow-babel-webpack-plugin Summary
A concise tool that glues together Flow and Webpack, with the help of Babel. It provides you with flow typecheck status in webpack build reports.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Checks the flow status of the flow
- Creates a new flow code
flow-babel-webpack-plugin Key Features
flow-babel-webpack-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on flow-babel-webpack-plugin
QUESTION
I have flow integrated into a webpack / babel build using flow-babel-webpack-plugin and it works great. Webpack dev server compiles / serves assets in less than a second and if there are flow type errors it prints them out nicely. I'm very happy with that.
The problem begins when I turn on my IDE. In both VSCode and Atom, if I enable any kind of flow support, my webpack / babel build immediately begins to choke. It will take anywhere between 4 and 70 seconds to compile any change. Often it fails and gives multiple flow is still initializing
notices and indicates it has tried to start the server over and over.
I suspect that both webpack and the IDE are trying to spin up separate flow servers at the same time and this is causing a conflict. Or they are using the same flow server and this is, for some reason, also a problem. I just can't figure out what to do about it. I have tried pointing at separate binaries with webpack using the global flow
and the IDE using the one from node_modules
. No dice.
It seems like this must be an extremely common use case - flow + a webpack watcher + any IDE whatsoever.
I'd like to have both my webpack build compile flow code and have my IDE show me syntax errors etc. So far that's been impossible
...ANSWER
Answered 2017-Jun-21 at 19:57It looks like that plugin uses its own copy of Flow, from the flow-bin
package:
If this version is out of sync with what your IDE is starting up, then they will fight -- starting up one version of Flow will kill any Flow server with a different version that is already running in that directory.
If you put flow-bin
in your devDependencies
(alongside this webpack plugin) and lock it to a specific version, and also set your IDE to use the Flow binary from flow-bin
, then it looks like npm
will just install the version you specify, and both the plugin and the IDE will be able to use the same Flow version.
Without knowing more specifics about your setup, it's hard to recommend a more concrete solution. You'll have to either make it so both your IDE and this webpack plugin are running the same version of Flow, or stop using either the IDE or the webpack plugin.
QUESTION
Is there a way to setup Flow to run with WebPack 2 watch. So that Flow would run a 'flow status' command on each WebPack successful build ?
Currently I tried:
webpack-shell-plugin.
It allows me to run shell commands before and after WebPacks build. But once a flow finds an error, it terminates the watch process. code:
...ANSWER
Answered 2017-Jun-17 at 07:04I solved this issue using
QUESTION
Getting the following error when trying to run webpack:
Command: webpack -d --watch
.babelrc:
...ANSWER
Answered 2017-Feb-22 at 16:50your .babelrc
file seems to be correct just make sure you have installed
all the presets before using them via
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flow-babel-webpack-plugin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page