|
| 1 | +# Changelog |
| 2 | + |
| 3 | +## [2.0.0](https://github.com/netlify/netlify-plugin-gatsby/compare/v2.0.0-zz-beta.0...v2.0.0) (2022-01-31) |
| 4 | + |
| 5 | +Version 2 of the Essential Gatsby build plugin adds support for the new render |
| 6 | +modes introduced in Gatsby 4, as well as improved support for Gatsby functions. |
| 7 | +For best results it should be installed alongside |
| 8 | +[`gatsby-plugin-netlify`](https://github.com/netlify/gatsby-plugin-netlify/). |
| 9 | +Beta support was available since Gatsby 4 was released, but with this stable |
| 10 | +release it is ready for production use for everyone. |
| 11 | + |
| 12 | +### Features |
| 13 | + |
| 14 | +This version adds full support for the new Gatsby 4 render modes on Netlify. |
| 15 | +Gatsby 4 introduced two render modes, alongside its original SSG mode. For a |
| 16 | +detailed comparison of each mode |
| 17 | +[see this blog post](https://www.netlify.com/blog/2021/09/16/run-gatsby-4-with-dsg-and-ssr-on-netlify-today/). |
| 18 | + |
| 19 | +To support these new modes, the Essential Netlify build plugin generates three |
| 20 | +serverless Netlify Functions that are automatically deployed alongside your |
| 21 | +site: |
| 22 | + |
| 23 | +- `__api`: used for Gatsby Functions |
| 24 | +- `__dsg`: an |
| 25 | + [on-demand builder](https://docs.netlify.com/configure-builds/on-demand-builders/) |
| 26 | + used for DSG pages. |
| 27 | +- `__ssr`: used for server-side rendered pages. |
| 28 | + |
| 29 | +You do not need to configure or deploy these functions yourself: they are |
| 30 | +automatically generated and deployed whenever you build. |
| 31 | + |
| 32 | +You can see the logs for these functions in the "Functions" tabs in the Netlify |
| 33 | +dashboard. |
| 34 | + |
| 35 | +It will also generate Netlify rewrites to ensure that each route is handled by |
| 36 | +the correct function. |
| 37 | + |
| 38 | +### Installing |
| 39 | + |
| 40 | +This version of the plugin will soon be installed automatically for all Gatsby |
| 41 | +sites on Netlify. If you can't wait, you can |
| 42 | +[install it manually](https://github.com/netlify/netlify-plugin-gatsby#installation) |
| 43 | +using file-based plugin installation. |
| 44 | + |
| 45 | +You should also install `gatsby-plugin-netlify` to enable all features. **It is |
| 46 | +required if you are using SSR pages**. See |
| 47 | +[how to install](https://github.com/netlify/netlify-plugin-gatsby#install-the-gatsby-plugin) |
| 48 | + |
| 49 | +### Deploying your site |
| 50 | + |
| 51 | +You do not need to do anything different to deploy your site if building on |
| 52 | +Netlify: it will automatically deploy the functions when you build. If you are |
| 53 | +deploying manually using the Netlify CLI, you must ensure that instead of |
| 54 | +running `netlify build` then `netlify deploy` as separate commands, you run them |
| 55 | +together as `netlify deploy --build`. |
| 56 | + |
| 57 | +### Caveats |
| 58 | + |
| 59 | +Currently you cannot use `StaticImage` or `gatsby-transformer-sharp` in SSR or |
| 60 | +DSG pages. The best workaround is to use an image CDN such as |
| 61 | +[Cloudinary](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-cloudinary-image-service/) |
| 62 | +or [imgix](https://github.com/imgix/gatsby) to host your images. This will give |
| 63 | +you faster builds too. |
| 64 | + |
| 65 | +### Feedback |
| 66 | + |
| 67 | +If you have feedback or bug reports, join |
| 68 | +[the discussion](https://github.com/netlify/netlify-plugin-gatsby/discussions) |
| 69 | +or [open an issue](https://github.com/netlify/netlify-plugin-gatsby/issues) |
0 commit comments