Create-react-app 不会针对 yalc 更新进行热重载

Jef*_*son 7 create-react-app

我们正在尝试添加 yalc ( https://github.com/whitecolor/yalc ) 以使本地处理依赖项变得更容易。当我向 yalc 发布更改时,它们确实会显示,但只有在 React 完全关闭并重新启动后才会显示。

有没有办法将 yalc 添加为可以重新加载 CRA 的东西之一?

Luí*_*lho 1

一种可能的解决方案是使用--replace强制替换包内容的选项

yalc push --replace
Run Code Online (Sandbox Code Playgroud)