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

fix(remix-dev): ensure devServerPort config value is the same across reloads #3202

Closed
wants to merge 1 commit into from
Closed

fix(remix-dev): ensure devServerPort config value is the same across reloads #3202

wants to merge 1 commit into from

Conversation

tessellator
Copy link

Closes: #2958

  • Tests

If the devServerPort changes values across config reloads then LiveReload will attempt to connect to an incorrect port. Files being created, deleted, or renamed under the app folder trigger config reloads.

Testing Strategy:

A test is included in the commit that ensures that the same devServerPort is always returned.

Additionally, I tested a new project with this code using the following steps:

  1. Create a new project using create-remix@latest and replace @remix-run/dev with a build including the code in the attached commit.
  2. Run npm run dev
  3. Browse to localhost:3000. Verify LiveReload is working by editing app/routes/index.tsx and observing the change.
  4. Create a new file app/components/SomeComponent.tsx and observe page refresh. Validate no websocket errors in browser console.
  5. Verify LiveReload is still working by editing app/routes/index.tsx and observing the change.

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 16, 2022

Hi @tessellator,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].

Thanks!

- The Remix team

…reloads

If the devServerPort changes values across config reloads then
LiveReload will attempt to connect to an incorrect port. Files being
created, deleted, or renamed under the app folder trigger config
reloads.

* chore: sign cla
@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 16, 2022

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@tessellator
Copy link
Author

tessellator commented May 16, 2022

This also appears to fix #1601 and #3130

@tessellator
Copy link
Author

Closing in favor of #3206

@MichaelDeBoey MichaelDeBoey added the duplicate This issue or pull request already exists label May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remix dev asset server web socket error
2 participants