babel codemod example:如何将babel用作codemod的示例 源码

agent83990 15 0 ZIP 2021-02-20 02:02:18

babel-codemod-example 当ES模块降落在Node中时,将无法执行以下操作: import { thing } from './common-js-module' 因为CommonJS不是静态可分析的。 但是许多人(包括我自己)已经做了很长时间了: import { readFile } from 'fs' 在,我向您展示了我编写的快速babel插件,该插件在代码上执行了codemod来自动修复此问题。

用户评论
请输入评论内容
评分:
暂无评论