简体   繁体   中英

Is it possible to run a build for particular change in Gatsby Project?

When I run the build for Gatsby project it is taking more than 1.30 HR because of lot of lot of dynamic pages. My question is when I make a change on a particular page or pages Is it possible to run the build for the particular changes?

For gatsby develop try using Gatsby flags . Used like this in the gatsby-config.js :

module.exports = {
  flags: {
    FAST_DEV: true,
  },
}

You can find a full detailed explanation of the current available flags at: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/flags.ts

In your case, try using FAST_DEV which includes PRESERVE_FILE_DOWNLOAD_CACHE and DEV_WEBPACK_CACHE flags respectively.

For gatsby build I think you are looking for a feature called Incremental Builds: which basically only builds the pages that have changed from the last deployment.

Depending on your deploy server there's a different implementation way:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM