Created
February 19, 2022 17:51
-
-
Save DavidWells/cc47e2e0756c709ddbaf18223444bbfc to your computer and use it in GitHub Desktop.
Debug what is in your netlify cache dir
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
const path = require('path') | |
const getCacheInfo = require('whats-in-the-cache') | |
const NETLIFY_CACHE_DIR = '/opt/build/cache' | |
const MY_BUILD_DIR = path.resolve('build') | |
const CACHE_MANIFEST_PATH = path.join(MY_BUILD_DIR, 'cache-output.json') | |
getCacheInfo({ | |
cacheDirectory: NETLIFY_CACHE_DIR, | |
outputPath: CACHE_MANIFEST_PATH, | |
}).then(() => { | |
console.log(`Cached file information saved to ${CACHE_MANIFEST_PATH}`) | |
}).catch((e) => { | |
console.log(e) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment