Closed OrrinHatch closed 7 months ago
welcome discuss in wechat:
emmm~ rn貌似要配置 metirc。 这个mark一下周末看看~~ 或者有兴趣可以一起看看。其实 @taro-hooks/core 是做了一个软链。rn可能没有被扫到
如果配置了的话可以把完整的 config/index.js 贴出来看下么
是直接用的官方的rn-template创建的项目么?
是的
ok ~ mark 一下周末看看. 或者直接在 alias 里加一下:
{
'@taro-hooks/core': '@taro-hooks/plugin-react/dist/runtime'
}
似乎看起来动态修改 webpack 的 define 在 rn 这边不会被合并到 metro 的配置中
Taro hooks 2.0 rn端 又爆出找不到TARO_ENV
没办法,我还是降到1.5的版本吧
ok ~ mark 一下周末看看. 或者直接在 alias 里加一下:
{ '@taro-hooks/core': '@taro-hooks/plugin-react/dist/runtime' }
可以解决这个bug
所以是已经解决了么? 还是?
解决了@taro-hooks/core, 又有其他bug
那看起来rn确实不能在webpack里面动态插值。这个得好好看看。
试试在 config.ts 里的 define 里加一下
TARO_ENV: JSON.stringify(process.env.TARO_ENV?.toLocaleUpperCase())
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
版本
复现步骤
按照官网2.X文档进行安装, @taro-hooks/plugin-react 也安装了
你期望的现象?
现有的现象?
复现 repo(最好可以提供一个复现的 repo)