Created
June 11, 2021 11:50
-
-
Save asgerb/9fca1715b510002241f5b37bea2fe516 to your computer and use it in GitHub Desktop.
netlify-cache-bridgetown-media-transformation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// Restore file/directory cached in previous builds. | |
// Does not do anything if: | |
// - the file/directory already exists locally | |
// - the file/directory has not been cached yet | |
async onPreBuild({ utils }) { | |
await utils.cache.restore("./.bmt-cache") | |
}, | |
// Cache file/directory for future builds. | |
// Does not do anything if: | |
// - the file/directory does not exist locally | |
async onPostBuild({ utils }) { | |
await utils.cache.save("./.bmt-cache") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: netlify-cache-bridgetown-media-transformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To cache the result of
bridgetown-media-transformation
between netlify builds, simply put these two files into/plugins/netlify-cache-bridgetown-media-transformation
.