Hey folks, just starting to get into Glitch and it looks like I could have a lot of fun here. So far, a big thing I’d like to see is maybe a configurable delay for auto-save.
The auto-save feature is neat, and I can definitely see how it’ll be cool to have changes happen as close to live as possible. In fact, I started playing with Hot Module Reloading in webpack to see how editing in Glitch could feed into that.
It seems like as soon as I start typing one character, it saves many times over the course of trying to make an edit. This makes the file watcher in webpack churn with many rebuilds in quick succession - some of which work and some of which break the build (e.g. because I started typing a statement, but haven’t finished it)
And I might be wrong, but it seems like the quick successive builds kind of drags down the whole container - to the point that even the editor gets unresponsive sometimes and seems to disconnect.
It would be nice if a) the auto-save maybe waited for an idle period where I’d stopped typing for awhile and b) if that waiting period were configurable. So, say I start typing a JS expression, it would be great to have maybe a 1-2 second pause before saving happens.
Webpack also has an aggregateTimeout setting under watchOptions to delay builds after save. That helps, but it’s a race: the clock on that timer starts with the first save and not the final edit before an idle period.
I might also poke around with webpack some more, maybe see if I can make it build on a button-push from the app. That seems like a shame, though, since there’s a nice feedback loop with auto-save