Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serve host and hmr host options to the development script #745

Merged
merged 1 commit into from
Sep 4, 2023
Merged

Add serve host and hmr host options to the development script #745

merged 1 commit into from
Sep 4, 2023

Conversation

kadhirvelm
Copy link
Contributor

Details

This PR exposes the host options for the development server (via --serve-host) and the hot module reload (via --hmr-host).

We would like these options exposed because our local development environment runs from inside a Docker container. We need a way to expose the development server and HMR that's running inside the Docker container to the local machine to make the development environment work properly.

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I agree to license this contribution under the MIT LICENSE
  • I checked the current PR for duplication.

Contacts

  • (OPTIONAL) Discord ID: N/A

If your PR is accepted, we will award you with the Contributor role on Discord server.

To join the server, visit: https://www.plasmo.com/s/d

Copy link
Contributor

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@louisgv louisgv merged commit 4827012 into PlasmoHQ:main Sep 4, 2023
1 check passed
@kadhirvelm
Copy link
Contributor Author

For documentation, to get Plasmo's dev server to work from inside our docker container, we had to add the following ports configuration to our docker-compose file:

ports:
  - '0.0.0.0:1012:1012'
  - '0.0.0.0:1815:1815'
  - '0.0.0.0:1816:1816'

In addition to adding the flags in this PR. This would bind the sockets to 0.0.0.0 in both the docker container and the local machine, letting the extension bundle access everything correctly once loaded into the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: TODO - PR WELCOME
Development

Successfully merging this pull request may close these issues.

2 participants