static-dev/spike-core

Forever Watch Mode

Closed this issue ยท 6 comments

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.

based on discussion in webpack/webpack#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 ๐Ÿ“

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

dbox commented

whoot!

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

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 ๐Ÿ˜ž

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