-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: update swc from 83 to 86 #876
Conversation
提 pr 前最好执行下 just ready 命令。 |
建议 commit msg 用英文。 |
本地执行过了,我看看是啥问题 |
crates/core/src/lib.rs
Outdated
@@ -13,7 +13,8 @@ pub use swc_core::css::{ | |||
pub use swc_core::ecma::transforms::{ | |||
base as swc_ecma_transforms, module as swc_ecma_transforms_modules, | |||
optimization as swc_ecma_transforms_optimization, proposal as swc_ecma_transforms_proposals, | |||
react as swc_ecma_transforms_react, typescript as swc_ecma_transforms_typescript, | |||
react as swc_ecma_transforms_react, testing as swc_ecma_transforms_testing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc_ecma_transforms_testing 是干啥的?好像没用到?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc_ecma_transforms_testing 是干啥的?好像没用到?
删掉了,原来好像有用到
crates/mako/src/transform.rs
Outdated
@@ -83,12 +85,20 @@ fn transform_js( | |||
// since when use this in js, it will remove all unused imports | |||
// which is not expected as what webpack does | |||
if is_ts { | |||
ast.visit_mut_with(&mut strip_with_jsx( | |||
let mut program = Program::Module(ast.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这类看下能否用 take 避免 clone。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这类看下能否用 take 避免 clone。
done
将swc升级到86版本,主要修改点:
部分测试用例修改:
遗留用例问题:
export const bar = {
中文: "xxx"
}
转 ascii 时,不会自动加上 "",导致有报错,所以先手动在用例上加上双引号了。