Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: release notes for 2.28 #28380

Merged
merged 24 commits into from
Dec 2, 2020
Merged
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
152723a
docs: release notes for 2.28
pieh Nov 30, 2020
5a164b4
adjust date
pieh Nov 30, 2020
5b985f0
Apply suggestions from code review
pieh Nov 30, 2020
f2908c0
finish instructions for enabling lazy images
pieh Nov 30, 2020
1600368
Update docs/reference/release-notes/v2.28/index.md
DSchau Nov 30, 2020
a16670a
update fast refresh
LekoArts Dec 1, 2020
51683c2
Update docs/reference/release-notes/v2.28/index.md
pieh Dec 1, 2020
a5e1749
remove double "from"
pieh Dec 1, 2020
e3b793b
add image plugin helpers
pieh Dec 1, 2020
9bd05a0
order content to be same as table of content
pieh Dec 1, 2020
626755a
add "Parallel data sourcing" to sneak peeks
pieh Dec 1, 2020
7bac641
add notable bugfixes
pieh Dec 1, 2020
e6a3d00
note about emotion major bump, slightly restructured notes (#28424)
vladar Dec 1, 2020
10a990b
Update index.md
KyleAMathews Dec 1, 2020
f5a02cd
update descriptions for bug fixes to be more readable
pieh Dec 1, 2020
9a6d77e
fix links, move lazyjs removal as last (we want to highlight new thin…
pieh Dec 1, 2020
447a7d9
Update docs/reference/release-notes/v2.28/index.md
pieh Dec 1, 2020
5c3a860
revert wrong change
pieh Dec 1, 2020
18834c3
Update docs/reference/release-notes/v2.28/index.md
DSchau Dec 1, 2020
af39583
Update docs/reference/release-notes/v2.28/index.md
DSchau Dec 1, 2020
d27b677
Update docs/reference/release-notes/v2.28/index.md
DSchau Dec 1, 2020
33a7296
Update docs/reference/release-notes/v2.28/index.md
DSchau Dec 1, 2020
59b9d32
Update docs/reference/release-notes/v2.28/index.md
DSchau Dec 1, 2020
3ad4252
format
pieh Dec 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions docs/reference/release-notes/v2.28/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
date: "2020-12-01"
version: "2.28.0"
---

# [v2.28](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.28.0) (December 2020 #1)

---

Welcome to `[email protected]` release (December 2020 #1).

Key highlights of this release:

- [New `gatsby new`](#new-gatsby-new) - new, interactive way to create a Gatsby site
- [Feature flags in gatsby-config](#feature-flags-in-gatsby-config) - set your feature toggles without environment variables
KyleAMathews marked this conversation as resolved.
Show resolved Hide resolved
- [Improved Fast Refresh integration](#improved-fast-refresh-integration)
- [Experimental: Lazy images in develop](#experimental-lazy-images-in-develop) - run image transformations only when they are needed by browser
- [Removed experimental lazy page bundling](#removed-experimental-lazy-page-bundling)
- [Notable bugfixes](#notable-bugfixes)

Sneak peek to next releases:

- [Less aggressive cache invalidation](#less-aggressive-cache-invalidation)

**Bleeding Edge:** Want to try new features as soon as possible? Install `gatsby@next` and let us know
if you have any [issues](https://github.com/gatsbyjs/gatsby/issues).

[Previous release notes](../v2.27/index.md)<br>
[Full changelog](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.28.0)

## New `gatsby new`

In previous release we added [interactive way of scaffolding new gatsby project](../v2.27/index.md#create-gatsby) (with `npm init gatsby`). Now we adjusted `gatsby new` command when no arguments are passed to also use the same flow.
DSchau marked this conversation as resolved.
Show resolved Hide resolved

## Feature flags in `gatsby-config`

Gatsby traditionally used environment variables to use various modes or enable experimental features. This worked, but it was from far from pleasant and had many issues, notably:

- Setting environment variables has idiosyncrasies across platforms (it's different for Windows and different for Linux or MacOS)
- Forced using NPM scripts (and correlating environment variables in continuous deployment solutions like Gatsby Cloud)

No longer! Now you can use flags in `gatsby-config.js`, which will work the same regardless of which environment you're on, where you're deploying, and for every member of your team! Woo hoo!

To use those, add `flags` to your `gatsby-config.js`:

```js
// In your gatsby-config.js
module.exports = {
// your existing config
flags: {
FAST_DEV: true,
},
}
```

Currently supported flags:

- `DEV_SSR` - Server-side render (SSR) pages on full reloads during develop. Helps you detect SSR bugs and fix them without needing to do full builds.
- `QUERY_ON_DEMAND` - Only run queries when needed instead of running all queries upfront. Speeds starting the develop server.
- `LAZY_IMAGES` - Don't process images during development until they're requested from the browser. Speeds starting the develop server. See [Experimental: Lazy images in develo](#experimental-lazy-images-in-develop) section for additional details.
pieh marked this conversation as resolved.
Show resolved Hide resolved
- `FAST_DEV` - Umbrella flag that enables `DEV_SSR`, `QUERY_ON_DEMAND` and `LAZY_IMAGES` features.
- `FAST_REFRESH` - Use React Fast Refresh instead of the legacy react-hot-loader for instantaneous feedback in your development server. Recommended for versions of React >= 17.0.

## Improved Fast Refresh integration

Gatsby had some support for `react-refresh` (or Fast Refresh as it can be referred to) already. The PR for a [preliminary Fast Refresh integration](https://github.com/gatsbyjs/gatsby/pull/26664) added a custom overlay, better error recovery and in general a better communication between Gatsby's dev server and React Fast Refresh. This will give you quicker feedback and an overall improved development experience.

To use it, add a flag to your `gatsby-config.js`:

```js
// In your gatsby-config.js
module.exports = {
// your existing config
flags: {
FAST_REFRESH: true,
},
}
```

Visit the [umbrella issue about Fast Refresh](https://github.com/gatsbyjs/gatsby/discussions/28390) to see preview images and give feedback.

## Removed experimental lazy page bundling

In [email protected] we added [Experimental: Lazy page bundling](../v2.27/index.md#experimental-lazy-page-bundling-in-development) mode for `gatsby develop` that would delay compiling page templates until it was needed. While preliminary tests were very promising, we discovered few showstoppers that degraded development experience. [We decided to end the experiment](https://github.com/gatsbyjs/gatsby/discussions/28137#discussioncomment-138998) for now and shift our efforts to [Less aggressive cache invalidation](#less-aggressive-cache-invalidation).

## Making `gatsby develop` faster

We continue working on speeding up development server startup:
DSchau marked this conversation as resolved.
Show resolved Hide resolved

### Experimental: Lazy images in develop

As more and more images are added to a Gatsby site, the slower the local development experience oftentimes becomes.
You spend time waiting for images to process, instead of you know, developing! No longer!
This experimental version of `gatsby-plugin-sharp` only does image processing when the page gets requested.

To use it, make sure you have `gatsby-plugin-sharp@^2.10.0` and add `LAZY_IMAGES` to flags in `gatsby-config.js`:

```js
// In your gatsby-config.js
module.exports = {
// your existing config
flags: {
LAZY_IMAGES: true,
},
}
```

[Details and discussion](https://github.com/gatsbyjs/gatsby/discussions/27603).

## Notable bugfixes

...

## Work in progress

### Less aggressive cache invalidation

Gatsby aggressively clears its cache, sometimes too aggressively. Here's a few examples:

- You `npm install` a plugin, or update an existing
- You change your `gatsby-node.js` and add a few log statements
- You change your `siteMetadata` in `gatsby-config.js` to update your site's title

In all of these caches, your cache is entirely cleared, which means that the next time you run `gatsby develop` the experience is slower than it needs to be. We'll be working on this to ensure that your first run, and every run thereafter, is as quick and speedy as you expect!
DSchau marked this conversation as resolved.
Show resolved Hide resolved



## Contributors

A big **Thank You** to [everyone who contributed](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.28.0) to this release 💜
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe give the count + list names esp community members? Plus the length of time since 2.27