Hot reloading - state of the project
landsman opened this issue · comments
Hello, I tried to search "hot reload" via search on website, in GitHub organisation, issues etc.
What I found is a few questions about that as well.
So what is the state? Does it working, or should, is it present? From what I tried I didn't noticed.
Can you please consider to create a new page, at least under Leaf tab and describe the current situation of Hot reload feature It's fine to say that's not supported at the moment and contribution is welcome, or provide a few links to workarounds, unofficial solutions.
I believe that this is a quite common thing that every new developer looking for and there is no answer.
You can disable leaf template caching with app.leaf.cache.isEnabled = false
, but yeah it makes sense for it to be in the docs
The cache is mentioned here but I'm happy to accept a PR to refine it. You still need to reload the page to see the changes.
There's also a PoC extension for Vapor that includes live previews of templates - https://github.com/HanneVerstraete/vapor-extension
Using https://github.com/cespare/reflex, you can trigger the swift run
command whenever the files under a certain directory change like so:
reflex -r 'Sources\/.*\.swift$' -R '\.build' -s swift run
Although I haven't tried it with a large project where the builds take some time.