Was just doing a bit of research on this.
Preact-cli supports both https://github.com/firebase/superstatic and https://github.com/1000ch/simplehttp2server https://github.com/developit/preact-cli/blob/35fd84a86fe6b6c8abd60aeb721494771930c4ff/src/commands/serve.js
Both look pretty compelling.
I would like to raise awareness of the several security vulnerabilities present in hapi: https://snyk.io/test/github/gatsbyjs/gatsby/master%2Fpackages%2Fgatsby
I think it would be a good idea to replace it with koa or fastify until an adequate static file server is found.
Thanks for the heads up. It shouldn't really be a problem because the serving is purely for development but I think it's still good to swap it out. I've already got a branch that uses zeits serve package but needs the Cli changes to be merged first
It'd be cool to serve the site using http/2 if possible. Dunno if that's easy or if the serve package handles that already.
Fixed in https://github.com/gatsbyjs/gatsby/pull/2763 馃帀