chore(main): release 2.0.0 #238
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 I have created a release beep boop
Changelog
2.0.0 (2022-01-31)
Version 2 of the Essential Gatsby build plugin adds support for the new render modes introduced in Gatsby 4, as well as improved support for Gatsby functions. For best results it should be installed alongside
gatsby-plugin-netlify
. Beta support was available since Gatsby 4 was released, but with this stable release it is ready for production use for everyone.Features
This version adds full support for the new Gatsby 4 render modes on Netlify. Gatsby 4 introduced two render modes, alongside its original SSG mode. For a detailed comparison of each mode see this blog post.
To support these new modes, the Essential Netlify build plugin generates three serverless Netlify Functions that are automatically deployed alongside your site:
__api
: used for Gatsby Functions__dsg
: an on-demand builder used for DSG pages.__ssr
: used for server-side rendered pages.You do not need to configure or deploy these functions yourself: they are automatically generated and deployed whenever you build.
You can see the logs for these functions in the "Functions" tabs in the Netlify dashboard.
It will also generate Netlify rewrites to ensure that each route is handled by the correct function.
Installing
This version of the plugin will soon be installed automatically for all Gatsby sites on Netlify. If you can't wait, you can install it manually using file-based plugin installation.
You should also install
gatsby-plugin-netlify
to enable all features. It is required if you are using SSR pages. See how to installDeploying your site
You do not need to do anything different to deploy your site if building on Netlify: it will automatically deploy the functions when you build. If you are deploying manually using the Netlify CLI, you must ensure that instead of running
netlify build
thennetlify deploy
as separate commands, you run them together asnetlify deploy --build
.Caveats
Currently you cannot use
StaticImage
orgatsby-transformer-sharp
in SSR or DSG pages. The best workaround is to use an image CDN such as Cloudinary or imgix to host your images. This will give you faster builds too.Feedback
If you have feedback or bug reports, join the discussion or open an issue