Visitar URL original
Request: Add option to not hot-reload certain file paths · Issue #53 · 11ty/dev-server · GitHub
Skip to content

Request: Add option to not hot-reload certain file paths #53

Description

@chasemccoy

Hello! I'm trying to upgrade my site to Eleventy 2.0.0 and the only feature I'm missing from the old BrowserSync server is the ability to not inject the snippet on certain pages.

I have a little in-browser editor for my blog and I run and use locally, and when I make edits in there it saves the changes back to the Markdown file on my filesystem. When this happens, it causes a page refresh, which blows away the state of my editor. I'd love to be able to tell Eleventy to not auto-reload that route specifically when a change is detected.

I was previously able to achieve this using this method in my Eleventy config:

config.setBrowserSyncConfig({
  snippetOptions: {
    ignorePaths: 'pathToIgnore/**',
  },
})

Activity

  1. tbroyer commented on Mar 7, 2023

    @tbroyer

    My use-case is that I have some HTML files loaded in a "playground" component on some pages (using the playground-elements similar to https://lit.dev/playground), those HTML files aren't directly loaded (as HTML) by the browser but through a service worker, and their content is displayed in the playground editor; the injected reload-client script creates noise in the editor, and doesn't work in the preview pane as its origin is actually from unpkg.com.
    I'd like to be able to ignore those files.

  2. edwardhorsford commented on Jan 5, 2024

    @edwardhorsford

    I came here to request an equivalent to ignorePaths also.

    My use case is somewhat similar to @chasemccoy - I have a local page I use for data capture, which I don't want to get auto-reloaded such that I lose that data. Without ignorePaths I'll have to be very careful when working on this page.

  3. added
    needs-votesA feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
    on Mar 13, 2025
  4. zachleat commented on Mar 13, 2025

    @zachleat
    Member

    Not to discount the request (I think it’s still a valuable feature add) but I do want to link up the much more obtuse (but currently available) workaround to disable the liveReload option globally: https://www.11ty.dev/docs/dev-server/

  5. removed
    needs-votesA feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions