mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Setup netlify-plugin-cache-folder
This commit is contained in:
parent
fb17befafd
commit
85254fe0f4
4 changed files with 10 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -92,3 +92,4 @@ dist
|
|||
.DS_Store
|
||||
/static/tailwind.css
|
||||
|
||||
/_cache
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@ import { isNetlify, rootDir } from '../environment.js'
|
|||
|
||||
|
||||
// https://github.com/hanbyul-here/nuxt-incremental-build-exp/blob/cb3ef6b001b283de77efee64733db273d991129b/cache-me.js
|
||||
export const CACHE_PATH = isNetlify
|
||||
? path.join('/', 'opt', 'build', 'cache', 'app_build') // Netlify cache path
|
||||
: path.join(rootDir, '.app_build_cache')//path.resolve(__dirname, '.app_build_cache')
|
||||
// export const CACHE_PATH = isNetlify
|
||||
// ? path.join('/', 'opt', 'build', 'cache', 'app_build') // Netlify cache path
|
||||
// : path.join(rootDir, '.app_build_cache')//path.resolve(__dirname, '.app_build_cache')
|
||||
|
||||
|
||||
export const CACHE_PATH = path.join(rootDir, '_cache')
|
||||
|
||||
|
||||
export async function getNetlifyConfig () {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ test('Can cache publish folder', async (t) => {
|
|||
// we check if a cached file already exists
|
||||
|
||||
if ( await hasCachedPublishFolder() ) {
|
||||
t.log('Publish folder has been cached already')
|
||||
t.log(`Found cached publich folder at ${ CACHE_PATH }`)
|
||||
t.pass()
|
||||
|
||||
return
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
CI = "1"
|
||||
|
||||
|
||||
[[plugins]]
|
||||
package = "netlify-plugin-cache-folder"
|
||||
|
||||
|
||||
# Production context: all deploys from the Production branch set in your site’s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue