| Q | A <!--(Can use an emoji 👍) --> | ------------------------ | --- | Fixed Issues? | | Patch: Bug Fix? | | Major: Breaking Change? | | Minor: New Feature? | | Tests Added + Pass? | Yes | Documentation PR | <!-- If so, add `[skip ci]` to your commit message to skip CI --> | Any Dependency Changes? | | License | MIT The `all` option landed in https://github.com/babel/babel/pull/7934/files#diff-3a8233bcd2766d2c7d87f23f944f7726R3 but it is only exposed from the plugin, not the preset, so this exposes it there too since the flow preset is what we want people to use.
@babel/plugin-syntax-flow
Installation
npm install --save-dev @babel/plugin-syntax-flow
Usage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["@babel/plugin-syntax-flow"]
}
Via CLI
babel --plugins @babel/plugin-syntax-flow script.js
Via Node API
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-syntax-flow"]
});