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

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 requestneeds-votesA feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions