babel-plugin-import
babel-plugin-import copied to clipboard
feat: conditional expression supports comma operator
import { NewPage, OldPage } from "components"; // 使用按需加载的两个控件
let condition = 1, temp = '';
let Tag = condition? (temp = 'New', NewPage) : (temp = 'Old', OldPage); // 无法渲染
在条件表达式的 consequent 或者 alternate 部分使用了 comma opereator 的情况下,原来的代码仍然会导致渲染失败,类似这个issue。
先前的这个 PR 对声明语句做了修复了,但是没有cover到其他表达式
@sorrycc 打搅一下,有时间review一下不?