Find Chrome and Edge from the host Windows as fallback when WSL 2 is mirrored network mode #604
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Marp CLI has been already supported out of the box conversion in WSL 1, but WSL 2 is not yet supported. (marp-team/marp#113) This PR introduces the out of the box conversion in WSL 2 with "mirrored network mode".
WSL 1 shares the network with Windows. Puppeteer can communicate with browser's remote debug that is binding to the localhost port. On the other hand, WSL 2 has a separated NAT network from Windows by default, so it is difficult to communicate WSL 2 with Windows.
If configured WSL 2 to enable "mirroed network mode", WSL 2 will become to share the network interface with Windows as same as WSL 1. In this mode, we have confirmed that Puppeteer for Chrome can communicate with the process on the Windows host.
Marp CLI's browser finder will become to resolve the Chrome/Edge from the host if the mirrored networking mode was enabled and the suitable browser was not found in WSL Linux.