Monarch lets users hot reload and hot restart stories on macOS and Windows. On Linux, users can hot reload, however hot restart is not implemented.
We are hoping to get help from the community on this issue.
The CLI dart code already handles the user request to hot restart. What's missing is the platform implementation to close the preview window and open a new one. Below are the implementations on macOS and Windows. The Linux implementation would be similar.
Monarch lets users hot reload and hot restart stories on macOS and Windows. On Linux, users can hot reload, however hot restart is not implemented.
We are hoping to get help from the community on this issue.
The CLI dart code already handles the user request to hot restart. What's missing is the platform implementation to close the preview window and open a new one. Below are the implementations on macOS and Windows. The Linux implementation would be similar.
On Windows, see
platform/windows/src/window_manager.cpp
, functionrestartPreviewWindow()
: https://github.com/Dropsource/monarch/blob/46d4f79b3649960eff371aaf51192da999ff8e74/platform/windows/src/window_manager.cpp#L231On macOS, see
platform/macos/monarch_macos/WindowManager.swift
, functionrestartPreviewWindow()
: https://github.com/Dropsource/monarch/blob/46d4f79b3649960eff371aaf51192da999ff8e74/platform/macos/monarch_macos/WindowManager.swift#L126