Closed gaokun closed 11 months ago
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
在metro.config.js中添加了上面提到的alias配置, 已解决, thx
const { mergeConfig } = require("metro-config");
const { getMetroConfig } = require("@tarojs/rn-supporter");
module.exports = (async function () {
return mergeConfig(
{
// custom your metro config here
// https://facebook.github.io/metro/docs/configuration
resolver: {},
alias: {
"~taro-ui/dist": `~taro-ui/rn`,
},
},
await getMetroConfig()
);
})();
问题描述
taro init了最基础的项目, 只引用了taro-ui的一个button, 编译到h5, weapp都ok
但是编译到rn, 预览后报错
复现步骤
这是可重现的工程: https://github.com/gaokun/taro-test
pnpm dev:rn --qr
来编译, 然后使用taro-playground来预览的期望行为
报错信息
系统信息
补充信息