/demo-netlify-incremental-builds

Demo how to keep files from previous Netlify builds and add new ones, with the help of a plugin.

Primary LanguageJavaScript

Demo Netlify Incremental Builds

Keep files from previous builds and add new ones.

How it works

This demo generates a new JSON file on every build. The name and contents of the file are set to the time of the build (9:52.json: { "time": "9:52" }).

Each build only generates a single file. Normally previous files are no longer available on the deployed website after a successful build. But by loading files from the previous builds from cache before the build, we get incremental builds. So older files are still available:

Note: this demo uses the Netlify Build Plugin for Gatsby to persist generated files / load previous ones from cache. But the plugin has nothing to with Gatsby, nor does this demo :)