How to reload enlive template?

93 views Asked by At

I have a web application that uses enlive.

If I change an html file used by a template I don't see the changes unless I restart figwheel.

I am using ring.middleware.reload/wrap-reload like this:

 (-> routes
     (ring.middleware.reload/wrap-reload {:dirs ["src" "resources"]})
 ...

...but without any effect.

Note that if I change any .clj or .cljs file I don't have to restart the server.

1

There are 1 answers

0
vidi On BEST ANSWER

Following the link given by Piotrek I found this project which fixed my issue: https://github.com/kolov/enlive-reload

The fix was to wrap the routes with (wrap-enlive-reload) and now everything works just fine.