Skip to content

Commit

Permalink
feat(gatsby): Opt in 20% of users to webpack dev server caching (#32829)
Browse files Browse the repository at this point in the history
We [added caching support for webpack in development in 3.10](https://www.gatsbyjs.com/docs/reference/release-notes/v3.10#experimental-webpack-persistent-caching-for-gatsby-develop) and it's gotten a fair bit of usage since.

Let's now opt-in 20% of users for a final test before release.
  • Loading branch information
KyleAMathews authored Aug 16, 2021
1 parent 23b7b60 commit 51b8420
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/gatsby/src/utils/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,13 @@ const activeFlags: Array<IFlag> = [
experimental: false,
description: `Enable webpack's persistent caching during development. Speeds up the start of the development server.`,
umbrellaIssue: `https://gatsby.dev/cache-clearing-feedback`,
testFitness: (): fitnessEnum => true,
testFitness: (): fitnessEnum => {
if (sampleSiteForExperiment(`DEV_WEBPACK_CACHE`, 20)) {
return `OPT_IN`
} else {
return true
}
},
},
{
name: `PRESERVE_FILE_DOWNLOAD_CACHE`,
Expand Down

0 comments on commit 51b8420

Please sign in to comment.