Elderjs / elderjs

Elder.js is an opinionated static site generator and web framework for Svelte built with SEO in mind.
https://elderguide.com/tech/elderjs/
MIT License
2.11k stars 53 forks source link

Bug: Hot reload dev server not working #211

Closed tylersayshi closed 3 years ago

tylersayshi commented 3 years ago

I'd like to request that the dev server performs a hot reload on file save. It is noted in the docs that the developer needs to make changes, save, then reload.

source

I'd be happy to attempt a PR for this if someone could point me in the right direction.

nickreese commented 3 years ago

Look into this plugin: https://github.com/Elderjs/plugins/tree/master/packages/browser-reload

tylersayshi commented 3 years ago

@nickreese thanks for the quick response. I am seeing now that I already have that plugin from using the template project through npx degit Elderjs/template my-project. My browser is not reloading on new saves even with the template project right now. I have tried using node versions 14.17.3 & 16.3.0. I have also tried setting reload for the plugin settings as both true or false.

Would you mind checking the template or have any other ideas for something I could be doing wrong?

nickreese commented 3 years ago

@tylerjlawson Pushed a fix. The issue is that in an earlier version of the Elder.js template I added the origin to example. This caused the plugin to be trying a websocket from example.com.