-
-
Notifications
You must be signed in to change notification settings - Fork 578
Adds live-reload with LiveReloadPlugin #1027
Conversation
|
||
<%= if( env == "development") { %> | ||
<!-- For buffalo to do live js/css reload --> | ||
<script src="http://localhost:35729/livereload.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we have javascriptTag
automatically generate <script src="http://localhost:35729/livereload.js"> </script>
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems the plugin provides a way to inject this script in the header without putting it here, so i removed this portion of the changes :)
@paganotoni @stanislas-m I know not of the magical ways for live reloading. :) is there a way to get this to trigger if a template has changed too? |
I don't see an option on the plugin for the HTML, but i will continue looking for alternatives :) |
Ok, here is an update on reloading when HTML changes, i ended up writing a webpack plugin that is a mix between webpack-livereload-plugin and a filewatch with chokidar. It works, but at this point, I wonder if we should just write our own Livereload websocket in Go and have refresh notify us on the change of some files that we would then send to the frontend. |
@markbates i'll add HTML reload support in another PR, I have a solution for it but I don't feel comfortable with it, I would like to take a bit more time reviewing alternatives. |
This PR adds live CSS and JS reload by using a different strategy than previous, submitting it for your consideration.