Skip to content

[BUG] Sequence Expression in umi3 cause error. #11819

@Mistrain-y-y

Description

@Mistrain-y-y

Recently, I'm using babel-plugin-istanbul, which will generate code with Sequence Expression (Comma Operator). And encountered a problem (I simplify it):

import {Form} from 'antd';

let a = 1;
const b = (a++, Form);// use Comma Operator

I think Form should be like these:
image

But I get these code:
image

Error:
image

I found the same issue in babel-plugin-import, but I don't know how to fix it when I use umi3. I use umi@3.5.41.
feat: conditional expression supports comma operator #593

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions