Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

写在代码同行末尾的注释会被转换到下一行 #158

Open
IceApriler opened this issue Aug 15, 2023 · 1 comment
Open

写在代码同行末尾的注释会被转换到下一行 #158

IceApriler opened this issue Aug 15, 2023 · 1 comment

Comments

@IceApriler
Copy link

问题描述?

转换前,注释写在代码同行末尾

globalData: {
    isIphoneX: false,
    navBarHeight: 0, // 导航栏高度
    menuButtonTop: 0, // 胶囊距上边界距离
    menuBotton: 0, // 胶囊距底部间距(保持底部间距一致)
    menuRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
    menuHeight: 0, // 胶囊高度(自定义内容可与胶囊高度保证一致)
}

转换后,注释放到了下面一行

globalData: {
    isIphoneX: false,

    navBarHeight: 0,

    // 导航栏高度
    menuButtonTop: 0,

    // 胶囊距上边界距离
    menuBotton: 0,

    // 胶囊距底部间距(保持底部间距一致)
    menuRight: 0,

    // 胶囊距右方间距(方保持左、右间距一致)
    menuHeight: 0,

    // 胶囊高度(自定义内容可与胶囊高度保证一致)
}

重现步骤

期望的结果

大佬,实际开发过程中经常会有注释写在代码同行末尾的情况,这种情况,转换之后能保持原样吗?

@zhangdaren
Copy link
Owner

看了一下,这是Babel解析就会这样,,暂时没法控制,

计划下个版本,将反混淆做成可配置的,(没有反混淆的需要)就关闭就好了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants