static-dev / spike-core

:warning: UNMAINTAINED :warning: A modern static build tool, powered by webpack
https://spike.js.org
Other
58 stars 9 forks source link

Forever Watch Mode #156

Closed jescalan closed 7 years ago

jescalan commented 8 years ago

So in theory we could with each compile generate a sort of manifest file that holds on to the mtimes for each file in the source. This way, between compiles, we could compare to the current source and not recompile files that have not changed, as long as they are still present in the public folder.

This would need to be transformed back through the dependency tree though. So for example if we found that a partial had changed, that means all the files that implement said partial would also need to recompile. So we'd need to hold on to a copy of the dependency tree as well.

In theory with both of those though, we would be able to make it such that a file that doesn't need to be recompiled is never recompiled. This opens up doors for creating much larger sites with more content using spike.

wkentdag commented 8 years ago

based on discussion in https://github.com/webpack/webpack/issues/250, webpack-hard-source looks like the current best bet to add this functionality to spike (and has some chance of getting integrated into webpack core, fingers crossed!). I won't have time to play with the plugin until at least next week, just dropping a line here for reference 📝

jescalan commented 7 years ago

So this has been implemented in the default template using hard-source, whoo!

dbox commented 7 years ago

whoot!

wkentdag commented 7 years ago

@jescalan any update on that netlify issue that was preventing hard-source from working across builds on their sites?

jescalan commented 7 years ago

Not at the moment, although the people at netlify said that it should be working... maybe try pinging Mathias in the gitter channel? I would take care of it, but have a rather full plate at the moment 😞

wkentdag commented 7 years ago

no problem. i'll get in touch with them tonight. thanks!