Here’s an article exposing several flaws of Gatsby as a framework, from the experience of applying it to a documentation site (using MDX)
Annotated version → https://diigo.com/0iof0d
Some key ideas from the article:
Gatsby builds are slow
At this point though it was becoming clear build times were a problem
You’d spend at least 5 minutes on image optimization alone, with no way to even disable that
we were crippling our iteration speed as well, since the build cache would invalidate under a variety of situations in early development
It seems build times is a real issue as it cannot be customized to fit different needs. For example, it seems you cannot disable Image optimization in the build (in case you have handled that by another method)
Deploy is not flexible
We started off leveraging what we had already done: deploying Jekyll with Docker onto our own infrastructure - effectively just proxied via a CDN
Also, it seems Gatsby is not flexible to adapt it to custom infrastructures
PS: I don’t fully understand why they couldn’t re-use their Docker infrastructure
GraphQL is a real pain for some users
trying to get objects modeled into a format that works in a semi-correct way in Gatsby is terrifying
It seems GraphQL is not really massively used by developers and it’s being a pain adopting it for some users. Besides this, it also seems is not fitting well for some use cases
GraphQL doesn’t really make sense for a static site generator
It’s a static website generator. It literally does not need GraphQL all over the place
it shouldn’t require a GraphQL API to read objects that are already in memory
I never thought of this but it’s true. One of the advantages of GraphQL is that you can get a customized JSON with only the data you need, reducing a lot the size of the JSON requested to the server and improving the speed and developer experience (less transformations of data will be needed)
But with a Static Site Generator this have less sense as most of the requests will be done in build time. Only those requests done in Client Side will fully benefit from the advantages of using GraphQL
So, conclusion on this → Using GraphQL on a SSG seems to be over-engineering
MDX is not as flexible as it seems
MDX is supposed to ease the integration of JSX code in Markdown documents but when taken to real world problems it seems there are some limitations
I don’t need JSX syntax in my markdown, I need a way to include JSX components. That might sound similar, but its quite a different thing.
It seems MDX is not succeeding in: allowing the inclusion of JSX components in markdown components
I share these ideas as a way to start a discussion and gather feedback from the team over these points, and maybe take these drawbacks into account for
- Marketing purposes: pushing messages where Frontity can be a solution over some of these issues: build times for example
- Development purposes: Flexibility of the framework can a real asset for framework adoption