请问Taro3中目前有办法使用分包异步化吗,微信小程序目前是支持的。

lvmkulzt  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(56)

这个特性解决了什么问题?

减少主包体积,避免包与包之间的资源调用问题,目前taro使用该特性无法正常渲染内容,以下有一个taro例子:
https://github.com/Jonny-Zou/nutui-taro-template.git

这个 API 长什么样?

// index.config.ts文件中支持componentPlaceholder分包异步加载的参数

export default {
navigationBarTitleText: "购物车",
usingComponents: {
"oi-temp": "../../subpkg-pages/cart/index",
},
componentPlaceholder: {
"oi-temp": "common",
},
};

相关问题