4 ms·
Reading through the comments I get the impression there is a mis-understanding of what gatsby is. It might be my misunderstanding but ... "Static Site generato
by greggman2 7y ago
Reading through the comments I get the impression there is a mis-understanding of what gatsby is. It might be my misunderstanding but ...
"Static Site generator" seems to be the confusion. If I'm reading correctly gatsby is more a replacement for webpack than for jekyll or ghost. You use it as scaffolding to help build your front end. The docs show it compiling react, jsx, using various plugins like emotion etc. It all looks like it's supposed to be a better webpack.
Am I wrong?
- woutr_be 7y agoI think you might be wrong in your understanding. Webpack is a bundler, which Gatsby uses. You can use Gatsby as a replacement for Jekyll or Ghost, they do the same thing, i.e. output static HTML. However Gatsby uses React and GraphQL to achieve that result. While Jekyll uses markdown files for example.
- lhorie 7y agoI think "static site generator" is a more apt description than "webpack replacement". The React code in Gatsby is SSR'ed only (in production mode, anyways) making writing idiomatic dynamic client-side React code very awkward. Also, Gatsby uses Webpack[1] and it doesn't expose compilation options in any meaningful way like webpack itself does (and it doesn't have a plug-and-play philosophy like Parcel either). I'm not a huge fan of webpack config API personally, but I certainly would never consider using Gatsby as an alternative generic purpose bundler! [1] https://github.com/gatsbyjs/gatsby/blob/561d33e2e491d3971cb2a404eec9705a5a493602/packages/gatsby/package.json#L135-L140 https://github.com/gatsbyjs/gatsby/blob/561d33e2e491d3971cb2...