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

Live reload or domdiff doesn't work with local custom tld #105

Closed
bediu opened this issue Jun 2, 2023 · 2 comments
Closed

Live reload or domdiff doesn't work with local custom tld #105

bediu opened this issue Jun 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bediu
Copy link

bediu commented Jun 2, 2023

Operating system

Linux

Eleventy

2.0.1

Describe the bug

I use an internally built in reverse proxy to create custom tlds for developments, such as website.local over (locally) authorized https for good measure.

This is my server options:

eleventyConfig.setServerOptions({
        port: 20464,
        liveReload: true,
        domDiff: true,

        host: 'website.local',
        https: {
          key: path.join(__dirname, '/.cert/localghost', 'https.key'),
          cert: path.join(__dirname, '/.cert/localghost', 'https.cert'),
        },
    });

Everything is working fine except the reloading features.

I am assuming this has to do with the websocket server, since my reverse proxy doesn't support the websocket protocol.

With other setups such as Vite, I simply set the websocket server through a config directly over localhost, so my reverse proxy doesn't try to handle it.

Can I do something similar with eleventy?

Reproduction steps

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See an error

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

@scragz
Copy link

scragz commented Oct 15, 2024

#9

@zachleat zachleat transferred this issue from 11ty/eleventy Mar 13, 2025
@zachleat zachleat added enhancement New feature or request and removed needs-triage labels Mar 13, 2025
@zachleat zachleat added this to the Eleventy Dev Server v2.0.7 milestone Mar 13, 2025
@zachleat
Copy link
Member

Per additional guidance offered via the Vite docs: https://vite.dev/config/server-options#server-hmr I’ve added a reloadPort option to the Dev Server in upcoming v2.0.7. This allows you to run the websocket server through a separate port from the primary web server.

Let me know if this does not fix your issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants