Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reloading - state of the project #850

Open
landsman opened this issue Jul 5, 2023 · 3 comments
Open

Hot reloading - state of the project #850

landsman opened this issue Jul 5, 2023 · 3 comments

Comments

@landsman
Copy link

landsman commented Jul 5, 2023

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.

@ptoffy
Copy link
Member

ptoffy commented Jul 5, 2023

You can disable leaf template caching with app.leaf.cache.isEnabled = false, but yeah it makes sense for it to be in the docs

@0xTim
Copy link
Member

0xTim commented Jul 5, 2023

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

@kublaios
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants