如何将Babel Standalone与Flow一起使用

问题描述

我是完全前端的Web开发人员,有时在IDE中使用TypeScript。但是TypeScript是严格的,它需要npm,并且我的主机上没有npm(我不想要另一个)。因此,Babel Standalone Flow是一个不错的选择。但是如何添加Flow插件

完成:

<script type="text/babel" data-plugins="______" src="script.js"></script>

解决方法

<script type="text/babel" data-plugins="flow-strip-types" src="script.js"></script>

查看https://babeljs.io/docs/en/plugins#docsNav