javascript - node_modules/mypackage 中的源更改时如何将 Metro 配置为热重载?
问题描述
在反应本机应用程序中,我使用以下内容metro.config.js
来支持符号链接:https ://github.com/react-native-community/cli/issues/1238#issue-673055870
Symlink 工作正常,当我更新Refreshing
屏幕上显示的源时,我可以看到。
但是,源仍然是旧的,我必须重新启动 Metro 进程和应用程序才能真正看到变化。
如何将 Metro 配置为从我的链接模块中进行热重载更改?
这就是我在watchFolders
地铁选项中所拥有的:
['/home/dka/.config/yarn/link/@pass-culture/id-check']
这就是我跑步时所拥有的watchman watch-list
:
watchman watch-list
{
"version": "20210124.162314.0",
"roots": [
"/home/dka/workspace/github.com/pass-culture/id-check-front/packages/id-check",
"/home/dka/workspace/github.com/pass-culture/pass-culture-app-native"
]
}
解决方案
推荐阅读
- visual-studio-code - 使用 vcpkg 在 macOS 中构建 libzippp: ld: library not found for -llibzip::libzip
- .net-core - Blazor:数据绑定需要额外的触发事件
- machine-learning - 从展平张量/numpy 数组中获取原始图像
- laravel - Laravel Test 失败时不执行 tearDown 方法
- python - Etsy API ListingVariationImage 端点期望 value_id 与已知 value_id 不同
- c# - C# 动态加载程序集并使用它然后卸载它
- javascript - 在嵌套的 Promise 中调用 resolve 之前执行的 Promise then()
- python - \x00 在 .txt 文件的开头
- arrays - 在数组中查找最大元素 - 程序无法识别最后一个元素
- javascript - 如果在谷歌地图的搜索框中复制粘贴地址,位置不会改变