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.
What's Changed
New Features 🎉
Bug Fixes 🐞
Docs update 📄
Other Changes
更新内容
新特性 🎉
Bug 修复 🐞
文档更新 📄
其他变更
This optimisation was introduced in version 2.22.0 to reduce code size by modularising lodash import, but it may also cause some compatibility issues, so in version 2.32.0 a new transformLodash configuration has been added to manually disable this optimisation. In this version, this optimisation is turned off by default, and lodash is not processed separately by default.
swc conversion was introduced in version 2.16.0, but the implementation still has some problems, such as format cjs does not have "Annotate the CommonJS export names for ESM import in node", sourceType commonjs support is poor, etc. In this version, swc conversion is no longer used in full, and all kinds of limitations and judgements are removed, and only swc is used as a supplement to some features.
refactor(module-tools):
此优化是由 2.22.0 版本引入,通过模块化 lodash 的导入从而减小代码体积,但这也可能导致一些兼容性问题,因此在 2.32.0 版本新增了 transformLodash 配置,可以手动关闭此优化。在此版本,默认关闭此优化,默认不对 lodash 作单独的处理。
swc 转换是在 2.16.0 版本引入,但实现仍存在一些问题,例如 format cjs 没有 “Annotate the CommonJS export names for ESM import in node”,sourceType commonjs 支持不佳等等,在此版本,不再全量使用 swc 转换,移除各种限制和判断,只使用 swc 作为部分功能的补充。