This repository was archived by the owner on Nov 8, 2022. It is now read-only.
chore(deps): upgrade next 12 #1265
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
swc 在 dev 模式下 OK, 但是在编译到生产环境时, displayName 会被编译成乱码,swc 暂时还没有支持类似 https://www.npmjs.com/package/babel-plugin-add-react-displayname 的插件
另外,生产环境下使用 swc 编译后,整体 size 从 429 kb 增加到了 440 kb, 有 10 kb 以上的差距 (gzip)
结论就是开发模式下可以使用 swc, 但是生产环境还是使用 babel 编译