You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
Polyfill
类似
Object.values
,String.prototype.matchAll
,需要前置注入代码一次性修改原型链,不需要替换代码Package 的做法
App 的做法
Helpers
类似 Object Spread(
{...obj}
)、Class 关键字、Async/Await 关键字这种,需要将对应代码编译然后替换为对应的实现Package transform 时的做法
import _extends from "@babel/runtime/helpers/extends";
import * as swcHelpers from "@swc/helpers";
Package bundle 时的做法
@swc/helpers
谁来依赖需要明确一下、另外是否跟其他包一样能被 externalApp bunlde 时的做法
@babel/runtime/helpers
和@swc/helpers
合并,防止重复引入,也可能会有其他的 helpers 未来需要考虑?...obj
语法,会在两个 chunk 里都打包一份 helper 实现@babel/runtime/helpers
和@swc/helpers
合并,目前肯定没支持其他
Package transform vs bundle
package bundle 模式的产物在应用里直接使用会导致构建优化不彻底的问题:
The text was updated successfully, but these errors were encountered: