Request: Add option to not hot-reload certain file paths
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 109
- Forks
- 20
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
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/**',
},
})
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the dev server's file-change handling and how it triggers page reloads or snippet injection. Compare the requested behavior with the shown BrowserSync snippetOptions.ignorePaths configuration. Done means a user can exclude a route or file path from automatic reload effects while other paths retain the current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- devtools, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100