Version
v2.2.2
Platform
macOS
What steps will reproduce the bug?
The expected behavior of HMR is that creating, updating, or deleting any file will result in changes being reflected in
the browser without needing to refresh the page or restart the server. However, when creating or deleting a _data.yml
file that has an associated remote file, the expected changes are not seen unless the server is restarted.
Steps to reproduce
- Clone this gist: https://gist.github.com/wjharney/d73914e8e74b77bc3a99e938af33bce9
- Run
deno task serve to start the server.
- Visit http://localhost:3000/posts/hello-world/ to see the post, with the heading "Base Template".
- While the server is running, run
echo 'layout: layouts/replacement.vto' > posts/_data.yml to change the layout used for the post.
- Refresh the page.
Expected Result: The heading should be "Replacement Template".
Actual Result: The heading is "Base Template".
- Stop and restart the server. The post now uses the correct template, with the heading "Replacement Template".
- Delete
posts/_data.yml.
- Refresh the page.
Expected Result: The heading should be "Base Template".
Actual Result: Neither template is used; the page only contains the post content, "Hello World".
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The page should be updated without needing to reload the page or restart the server.
What do you see instead?
The changes aren't reflected unless the server is restarted.
Additional information
- Updating
posts/_data.yml works as expected.
- Creating a third layout while the server is running and updating the
_data.yml to point to that layout works as expected.
- Creating, updating, or deleting a
_data.yml that does not have a remote file associated works as expected.
Version
v2.2.2
Platform
macOS
What steps will reproduce the bug?
The expected behavior of HMR is that creating, updating, or deleting any file will result in changes being reflected in
the browser without needing to refresh the page or restart the server. However, when creating or deleting a
_data.ymlfile that has an associated remote file, the expected changes are not seen unless the server is restarted.
Steps to reproduce
deno task serveto start the server.echo 'layout: layouts/replacement.vto' > posts/_data.ymlto change the layout used for the post.Expected Result: The heading should be "Replacement Template".
Actual Result: The heading is "Base Template".
posts/_data.yml.Expected Result: The heading should be "Base Template".
Actual Result: Neither template is used; the page only contains the post content, "Hello World".
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The page should be updated without needing to reload the page or restart the server.
What do you see instead?
The changes aren't reflected unless the server is restarted.
Additional information
posts/_data.ymlworks as expected._data.ymlto point to that layout works as expected._data.ymlthat does not have a remote file associated works as expected.