-
Notifications
You must be signed in to change notification settings - Fork 20
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
Bad build should trigger livereload #70
Comments
HMR is the way to go and that means breaking down the boundary between file system and browser. Create web sockets and send just updated contents into the browser. You can be notified of bad build AND keep working. We can stop the bundling insanity that kills cycle time. |
Totally agree. I haven't delved into it much so far, other than reading a few blog posts and watching a few shiny demos, but it's clearly the direction that things are moving in. Have you experimented with any of the implementations out there? |
No, not yet. Web sockets in all modern environment (node and chrome) are dead easy though. Haven't kept up on the gobble architecture, would be cool if the nodes and transform model could just cross over the boundary and continue. |
True - question is how does the client script get injected? Is it kosher to just append a
it's a work in progress... |
If someone has a build system they can easily conditionally include it themselves. But throwing it in automagically might be fine too. There's probably some configurable hooks, or the build system doesn't go the full mile, because given the type of file you'd want to do different things. A css file can be mapped to a style tag and swapped, but a js file may, or may not, require a "reload". A ractive component could be hot-loaded (assuming we had the api for that), etc. |
The livereload signal is only sent when a build completes. I think it should also be sent if the build breaks, since otherwise the only indicator you get is a) the CLI output (which might not be visible on the screen, particularly if you're working on a laptop), or b) you notice that the page doesn't seem to be reloading any more.
A related question is whether the livereload signal should be sent as soon as the build invalidates. For: nice short feedback loop. Against: a complex build might take a while, and you don't get a chance to continue using the previous build, or take a mental snapshot of the app state (tangential thought: what would it take to support figwheel/steal/webpack-style hot module replacement?) while the rebuild is happening
The text was updated successfully, but these errors were encountered: